User Tools

Site Tools


cqp:extending-queries-alternatives

[ Collection: Introduction to CQP ]

3b. Extending simple queries: Combinations of attributes and values

This section introduces simple queries involving one token with more than one property, It presupposes that you have read Section 1 and Section 2.

Recall that in Section 2, we searched for love, and that our queries always returned examples of the noun and the verb. However, when searching for a particular lemma or word form, we typically want to limit our query to a particular part of speech. We can do this by combining two attribute-value pairs in a single pair of square brackets using the ampersand symbol &[attribute=“value” & attribute=“value”].

For example, to find love as a singular noun (one love, to cite Bob Marley's famous song), the query would look like this:

[hw="love" & pos="NN1"]

Enter it at the prompt and hit RETURN. You will see that the concordance contains only uses of the singular noun love.

Or, we might be interested in whether the noun love can be used in the plural. Our query would look like this:

[hw="love" & pos="NN2"]

Again, run the query and look at the results. You will see, that the plural noun loves does indeed exist.

Summary and outlook

This section has shown you how to create concordances using combinations of attribute-value pairs. Building on this, you can look at the following sections in any order:

[ Introduction to CQP: Section 1Section 2Section 3Section 4Section 5Section 6 ]

cqp/extending-queries-alternatives.txt · Last modified: 2024/06/20 13:53 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki