Searching complex patterns
This page provides details on some of the more complex searches you can do in APLS: multi-word searches, multi-layer searches, and multi-word multi-layer searches. These advanced searches rely on features described on other search documentation pages, so it is recommended that you review those first if you are new to using APLS.
On this page
Searching multiple words
In an earlier documentation page, we said that searching not even
in the orthography layer would not return any matches because there are no single words that match “not even”. The way to search for multiple words is to make the search “wider”.
Clicking on the right side of the input fields makes the search wider by adding another word to your search pattern.
The followed immediately by drop-down menu lets you choose whether the search should be the immediate next word, 1 word after the immediate next word, or 2 words after the immediate next word.
You can make your pattern as wide as you need to conduct your search, and every additional input field works exactly like the initial input field for that layer. Clicking makes your search narrower by removing a word from your search pattern.
To search for every instance of the word “not” immediately followed by the word “even”:
- Go to the search page.
- Click
to make your search pattern one word wider.
- Enter
not
in the first orthography layer text field and entereven
in the second orthography layer text field.- Click the Search button.
Similar to multiple segment searches, you can designate one of the words in your multi-word search as your “token of interest” by clicking the target for that word. This will not affect the number of matches that are found, but it will affect what information is included when exporting data.
Searching multiple layers
Up to this point in the documentation, most of the search page capabilities have been demonstrated with single layer searches. Many researchers, however, will be interested in finding patterns that match multiple types of criteria. Constructing a search using multiple layers makes this possible.
For example, the TRY IT!
below uses the orthography layer and the part_of_speech layer to find all instances of “run” as a noun.
To find matches for all instances of “run” used as a noun:
- Go to the search page.
- Select the
syntax
project in the layer picker and click the checkbox for the part_of_speech layer to make the part_of_speech input field appear.- Enter
can
into the orthography input field.- Click the part_of_speech drop-down menu button (
) and select NN from the NOUN: section.
- Click the Search button.
You can also use the matches drop-down menus to find results that match on some layers and don’t match on other layers. An example is given in the TRY IT!
below using the segment layer and the stress layer to find /u/ without primary stress.
To find all matches for the segment /u/ that don’t have primary stress:
- Go to the search page.
- Click the checkbox for the segment layer to make the segment input field appear.
- Enter
u
into the segment input field.- Select the
phonology
project in the layer picker and click the checkbox for the stress layer to make the stress input field appear.- Click the drop-down selection menu on the right side of the stress input field and select primary.
- Click the matches drop-down menu for the stress input field and select doesn’t match.
- Click the Search button.
The target option becomes particularly useful when doing multi-layer searches that include segment layers. As mentioned in Searching segments within words, segment layers search for individual speech sound matches and all other layers search for word matches. By default, multi-layer searches will look for one match per word. If you want the results to contain matches for every instance of a segment(s), you should click the target
for the segment input field.
To generate search results with matches for both /i/ vowels in the word “really”, so that every instance of “really” appears twice:
- Go to the search page.
- Click the checkbox for the segment layer to make the segment input field appear.
- Enter
really
into the orthography input field andi
into the segment input field.- Click the target
for the segment input field.
- Click the Search button.
If you conduct this same search with the orthography layer as the target layer, you will get half the number of results because the search is only matching each instance of the word “really” once.
Searching multiple words and multiple layers
Because the search page uses a matrix of expressions to find search results, searches can be simple (one word wide and one layer deep) or complex (multiple words wide and multiple layers deep). This allows the search function to find very specific matches based on multiple different criteria.
To find matches for every consonant-initial verb that is preceded by the word “the”:
- Go to the search page.
- Select the
syntax
project in the layer picker to make the part_of_speech layer appear in the selection menu.- Select the part_of_speech layer in the selection menu to make the part_of_speech pattern input field appear.
- Enter
the
in the orthography layer text field.- Click
to make the search pattern one word wider.
- Open the drop-down menu for the second part_of_speech input field and click VERB: to add a regex pattern that will match all adjectival POS tags.
- Open the drop-down menu for the second segment input field and click CONSONANT to add a regex pattern that will match all consonant segments.
- Click the lock
on the left side of the second segment input field to specify that you only want to match words that begin with a consonant segment.
- Click the target
for the second part_of_speech input field to select the second word as the target of your search (as opposed to targeting “the”).
- Click the Search button.