Finding Words in Phrases

By Miller Prosser, February 2018

This article builds upon the explanation provided in the article Find Co-occurrences of Words within Texts. Reference that article for more background and instruction on how to configure the components to use in the query. This article will demonstrate how these same strategies apply to finding words within specific types of phrases.

This type of query presupposes that words in texts have been grouped together into phrases, and that these phrases have been described with properties. To learn how to do this step, see the article Nesting Discourse Units.

First, begin by scoping the query to search within the Discourse Units category. Choosing a specific hierarchy of texts is optional.

Scoping a Query

Next, configure the query to search for the descriptive properties of the phrase AND the components to find contained within that type of phrase. In this case, the query is searching for a type of phrase called a "Quantity Clause." (NOTE: the clause types were defined by this project. Each project may define its own clause types.) The query will then consider only those Quantity Clauses that contain the two words indicated in the COMPONENTS property. In this case, the two words are uṭṭatu (barley) and kurru (a dry measure). Note that the Operator for the COMPONENTS property is "in sequence." This will tell the query to consider ONLY cases where these two words occur in the sequence provided in the concept (see below). The other option in the Operator column is "that occur." This latter option is less restrictive, including any cases where the words appear together, regardless of word order.

Query Configuration

Here is how the Barley-kurru COMPONENT is configured. Again, see the article Find Co-occurrences of Words within Texts for more details on this strategy.

Query Components

NOTE: Just to be clear, the Name of the Concept above (Barley-kurru) has no bearing on the functionality of the query. This could be named COMPONENT #1 if you prefer. The list of words in the Component(s) field determines what the query will consider. Here, we have linked in the lemmas for barley and kurru-measure.

This type of query will return the phrase (i.e. discourse unit) that matches the properties, in this case the Quantity clause, even if the words are further nested in other subordinate phrases, clauses, etc. So, keep in mind. The properties determine which discourse units will be returned by the query.

In many cases, it may be desirable to save the query results to a set where you can configure which columns appear in the table, such as text reference, textual content, etc. See the article Customize set columns for more on that topic.