uima MARK annotation in CONTAINS

41 views Asked by At

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.

1

There are 1 answers

1
Peter Kluegl On BEST ANSWER

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.