Skip to main content
Version: 2.0


Pattern attributes

Attributes are the properties of a token after analysis by the comprehension API. By defining an attribute in a pattern, only tokens that match the specific attribute will be matched.

SourcePart of speech tag.
IndexToken position in sentence.
LemmaLemmatized version of the source.
DependencyDependence objects combine the results from the dependency parser with the understanding from the NLU api.
CategoriesList of all categories that can be found in Category Objects. Categories are organized by super-categories, each containing a number of sub-categories.
PostagPart of speech tag.
Sentence indexClass from ontology (must have an ontology).
ClassClass from ontology (must have an ontology).

Pattern modifiers

Each attribute can map either to a single value or to a dictionary that allows modifiers for more complex behaviors.

SuperiorAttribute value is greater than list member.
Superior or EqualAttribute value is greater than or equal to list member.
InferiorAttribute value is less than list member.
Inferior or EqualAttribute value is less than or equal to list member
InsideAttribute value is member of a list.
Not insideAttribute value is not member of a list.
Is SubsetAttribute value is a subset (part of) this list
Is SupersetAttribute value is a superset of this list.

Pattern variable

ValueEntity or other
DependencyDependency tags
PostagParts of speech tags
IndexToken position in sentence.
ClassClass from ontology (must have an ontology)

Movement operators

Movement operators move between two elements. When you add additional elements this will create a chain and you will need to the the movement operator.

element A > move > element B
Upis children of ... is children of ... (look token parent in tree)
Downhas children ... (look in children tokens in tree)
Previousis directly following ...(look previous token in sentence)
Nextis directly followed by ... (look next token in sentence)
Jumpis followed by ... (look in all next tokens in all text )