Skip to content

module__PatternMatcher

Robert Bossy edited this page Jul 27, 2017 · 1 revision

#org.bibliome.alvisnlp.modules.pattern.PatternMatcher

Synopsis

Matches a regular expression-like pattern on the sequence of annotations in a given layer.

Description

org.bibliome.alvisnlp.modules.pattern.PatternMatcher searches for pattern on the sequence of annotations in layer layerName. Note that in a layer, annotations are sorted in increasing order of start boundary, then decreasing order of end boundary; the order is undefined for annotations with the exact same span.

For each match, org.bibliome.alvisnlp.modules.pattern.PatternMatcher applies all actions specified by actions. Each action concerns a sub-group of the pattern, if no sub-group is specified then the action applies to the whole match.

Parameters

Optional

Type: MatchAction[]]

Actions to perform each time the pattern is matched on the annotation sequence. See MatchActionArray for all available actions.

Optional

Type: ElementPattern

Pattern to match see ElementPattern for pattern syntax.

Optional

Type: Mapping

Features to add to all annotations created by this module, these features are added for all actions that create an annotation.

Optional

Type: Mapping

Features to add to all relations created by this module, these features are added for all realtions that have been created by an action that creates a tuple.

Optional

Type: Mapping

Features to add to all tuples created by this module, these features are added for all actions that create a tuple.

Default value: length

Type: AnnotationComparator

Comparator to use when removing overlaps.

Default value: true

Type: Expression

Only process documents that satisfy this filter.

Default value: words

Type: String

Match the pattern on the annotations contained in this layer.

Default value: remove

Type: OverlappingBehaviour

What to do if the layer contains overlapping annotations.

Default value: boolean:and(true, nav:layer:words())

Type: Expression

Only process sections that satisfy this filter.

Clone this wiki locally