**[ [[cqp:introduction|Collection: Introduction to CQP]] ]** ===== Querying with Repetition Operators and other Regular Expressions ===== For the following exercises, use repetition operators like ''*'', ''+'' and ''{}'' and other regular expressions such as ''[]'' , ''()''. Like in the previous section, you will also have to be familiar with positional attributes of the BNC. For more information how to use these operators in CQP, please see the Wiki-page on [[cqp:regular-expressions-basics| Regular Expressions (Basics).]] ==== Exercises 1: Prefixation ==== Query //post-// as a hyphenated prefix attaching to adverbial bases in the BNC. Use the positional attribute ''word'' (case-insensitive) restricted to ''%%pos="AJ."%%''. How many instances do you find? ==== Exercise 2: Prefix- and Suffixation ==== Formulate a query that matches all words that begin with //in-// and end with //-ible// in the BNC-BABY. How many instances do you find? ==== Exercise 3: Matching different word forms ==== - Formulate a query that matches both //snowed// and //snowing// (case-insensitive), but not //snows// or other word forms in a corpus of your choice. - Formulate another query that matches //snow// and //slow// (case-insensitive). Try to think of more than one way to solve each exercise. ==== Exercise 4: Collocation ==== Explore the types of objects that the synonymous verbs //change// and //alter// collocate with. To do so, proceed accordingly: - One verb at a time, query transitive usage patterns. Your query can include another word, which must be a noun, as well as up to two optional elements in between. - Using the command ''%%count Last by hw on matchend%%'', export a (tidied) frequency list of the nouns in object position for each verb. - Finally, compare the word lists. Can you make any semantic generalizations about the objects which collocate with //change// and //alter//, respectively? In the BNC-BABY, you should match roughly 1200 and and 70 instances, respectively. ==== Solutions ==== Find the solutions for the exercises here: [[cqp:repetition-operators-solutions|Repetition Operators – Solutions]] ==== More practice? ==== Continue here: [[cqp:practice-working-with-concordances|6c. Working with Concordances]]