Links and nodes frequently have features which are normally single values constants attached to the graph element. When they are used in conditions they make the rule more selective. For example, to match any token where the value of its "length" feature (the number of characters in the word) is equal to 5, we would employ the pattern element:
To match a term.symbolic with a feature of "punctuation" where it is equal to "true" you would use:
To match a term.symbolic with a feature missing like "comma-punct" you would use:
You can use any of the following constants in conditions:
The valid operators in conditions are:
If you do not need to use a condition for a feature you can omit the <>
Nodes carry information about the characters that appear before, after and in between links. Both nodes and links can appear in matching patterns. Nodes occur between the links. By default unconditioned nodes are assumed to appear between links, so it is only necessary to include nodes in matching patterns when a condition on the node is needed.
For example, to match a token with the feature "length" equal to "5" but only if it is at the beginning of a text block you would use:
The full list of functions available in EESs is given in Entity Extraction Script functions. They can all be used in defining Conditions.
Simple functions are used to place more complex conditions on features than are available with the conditions: "=" and "!=", for example:
which only matches tokens longer than 9 characters.
There are a range of functions that enable pattern elements to match more than one link at the same position, such as "costarts()" and "contains()", for example:
which would fire for the text snippet 'The client said he should be called "JOHN Smith"'.