Mimir Query Examples
Contents
See also this example query session.
1. Simple Queries
1.1. Plain Text Query
Any word is a plain text query.
1.2. Named Index Query
Multiple indexes can be used to represent different views of the text. A typical configuration could include string, part-of-speech, and morphological root.
Part-of-speech query: searching for gerund verbs. The reference for the part of speech labels used by Mimir can be found in the GATE Manual.
Morphological root query: searching for various forms of the verb to be.
1.3. Sequence
Sequence is the default operator: any sequence of queries is treated a phrase query.
2. Annotation Queries
Annotation queries are used to find occurrences of annotations, specified using the annotation type and, if required, feature values.
Searching for references to figures (using the Reference annotation and its type feature).
Searching for interval measurements (using the Measurement annotation and its type feature).
Searching for measurements of a particular dimension (e.g. length).
Combining multiple feature constraints, e.g. dimension and type:
For Measurement annotations, a special virtual attribute named spec can be used to specify the range of values desired:
3. Complex Queries
Various operators can be used to create compound queries.
3.1. Boolean
Boolean operators can be used, e.g. disjunction (either "OR" or "|" can be used):
...or conjunction (either "AND" or "&" can be used):
3.2. Overlap Operators
IN queries: searching for hits of a query inside hits of another (e.g. London or New York, inside Reference annotations).
OVER queries: searching for hits of a query that cover the hits of another query (e.g. only Reference annotations that contain the word London).
3.3. Combining operators
The various available operators can be arbitrarily combined to create complex queries.
Two-dimensional measurements:
Measurement ranges:
Finding the subject of a measurement: