ludgo
ludgo

Reputation: 485

uima MARK annotation in CONTAINS

The following marks Line to M_Subordinator (same as M_Line)

(Line{CONTAINS(Phrase), CONTAINS(Subordinator) -> MARK(M_Subordinator)}){-> MARK(M_Line)};

How to mark Subordinator to M_Subordinator?
Because I need to mark both Phrase and Subordinator separately, not interested in the whole match.

Upvotes: 1

Views: 46

Answers (1)

Peter Kluegl
Peter Kluegl

Reputation: 3113

Maybe something like this:

Line{CONTAINS(Phrase), CONTAINS(Subordinator) -> M_Line} -> {Subordinator{ -> M_Subordinator};};

This rule matches on each Line annotation and, if this Line contains a Phrase and a Subordinator annotation, then this Line is annotated with the type M_Line. Additionally, an inlined rule is executed as an action: The inlined rule matches on all Subordinator annotations within the currently matched Line annotation and annotates it with the type M_Subordinator.

Upvotes: 1

Related Questions