To search for word forms in ANNIS2, simply select a corpus (in this example the small PCC2 demo corpus) and enter a search string between double quotation marks, e.g.:
"statisch"Note that the search is case sensitive, so it will not find cases of capitalized 'Statisch', for example at the beginning of a sentence. In order to find both options, you can either look for one form OR the other using the pipe sign ( | ):
"statisch" | "Statisch"or else you can use regular expressions, which must be surrounded by slashes ( / ) instead of quotation marks:
/[Ss]tatisch/To look for a sequence of multiple word forms, enter your search terms separated by & and then specify that the relation between the elements is one of precedence, as signified by the period ( . ) operator:
"so" & "statisch" & #1 . #2The expression #1 . #2 signifies that the first element ("so") precedes the second element ("statisch"). For indirect precedence (where other tokens may stand between the search terms), use the .* operator:
/[Ss]o/ & "statisch" & "wie" & #1 . #2 & #2 .* #3The above query finds sequences beginning with either "So" or "so", followed directly by "statisch", which must be followed either directly or indirectly (.*) by "wie". A range of allowed distances can also be specified numerically as follows:
/[Ss]tatisch/ & "wie" & #1 .1,5 #2Meaning the two words may appear at a distance of 1 to 5 tokens. The operator .* allows a distance of up to 50 tokens by default, so searching with .1,50 is the same as using .* instead. Greater distances (e.g. .1,100 for 'within 100 tokens') should always be specified explicitly.
Finally, we can add metadata restrictions to the query, which filter out documents not matching our definitions. Metadata attributes must be preceded by the prefix meta:: and may not be bound (i.e. they are not referred to as #1 etc. and the numbering of other elements ignores their existence):
/[Ss]tatisch/ & "wie" & #1 .1,5 #2 & meta::Genre="Sport"To view metadata for a search result or for a corpus, press the "i" icon next to it in the result window or in the search form respectively.