Complete List of Operators

The ANNIS Query Language (AQL) currently includes the following operators:

Operator Description Illustration Notes
.direct precedence
A B
For non-terminal nodes, precedence is determined by the right most and left most terminal children
.*indirect precedence
A x y z B
For specific sizes of precedence spans, .n,m can be used, e.g. .3,4 - between 3 and 4 token distance
>direct dominance
A
|
B
A specific edge type may be specifed, e.g.: >secedge to find secondary edges. Edges labels are specified in brackets, e.g. >[func="OA"] for an edge with the function 'object, accusative'
>* indirect dominance
A
|
...
|
B
For specific distance of dominance, >n,m can be used, e.g. >3,4 - dominates with 3 to 4 edges distance
_=_identical coverage
A
B
Applies when two annotation cover the exact same span of tokens
_i_ inclusion
AAA
B
Applies when one annotation covers a span identical to or larger than another
_o_ overlap
AAA   
   BBB
For overlap only on the left or right side, use _ol_ and _or_ respectively
_l_ left aligned  
AAA
BB 
Both elements span an area beginning with the same token
_r_ right aligned
AA
BBB
  Both elements span an area ending with the same token
->LABEL labeled pointing relation
      LABEL      
                
V  
A B
A labeled, directed relationship between two elements. Annotations can be specified with ->LABEL[annotation="VALUE"]
->LABEL * indirect pointing relation
LABEL   ...   LABEL
                        
   V  
A B
An indirect labeled relationship between two elements. The length of the chain may be specified with ->LABEL n,m for relation chains of length n to m
>@l left-most child
A
/ | \
B x y
 
>@r right-most child
A
/ | \
x y B
 
$ Common parent node
x
/ \
A B
 
$*Common ancestor node
x
|
...
/ \
A B
 
#x:arity=n Arity x
 / | \
 1 … n
Specifies the amount of directly dominated children that the searched node has
#x:tokenarity=n Tokenarity x
...
/ \
1 ... n
Specifies the length of the span of tokens covered by the node
#x:root Root ___
x
...
Specifies that the node is not dominated by any other node within its namespace