AlvisNLP

corpus processing engine

ElementPattern

Synopsis

Converts into an annotation pattern to be used by PatternMatcher .

String conversion

A pattern consists in a sequence of predicates. A predicate is a condition on an annotation, thus the pattern matches subsequences of annotations that yield true for each predicate.

Available predicates:

The operator precedence is the usual one ( or > and > not ). The precedence can be overriden using parentheses.

Additionally the following two pseudo-predicates are available:

Predicates can be quantified. The following quantifiers are available:

These are greedy quantifiers. If there is a question mark ( ? ) after the quantifier, then this quantifier is reluctant . See Java Pattern documentation for a complete description of greedy and reluctant quantifiers.

Predicate sequences may be grouped between square brackets. This allows the quantification of sub-patterns. Groups can be named by specifying the name after the opening bracket and

Examples:

XML conversion

<param/>

or

<param/>

or

<param>PATTERN</param>

PATTERN will be converted as a string.