Commit e98231ec authored by javi's avatar javi

add lemma to annotation

parent 41321fdc
Imports: {
import static gate.Utils.*;
}
Phase:firstphase
Input: Lookup
Options: control = all
Rule: label_mapping
(
{Lookup}
)
:lookup
-->
{
gate.AnnotationSet lookup = (gate.AnnotationSet) bindings.get("lookup");
gate.Annotation ann = (gate.Annotation) lookup.iterator().next();
FeatureMap lookupFeatures = ann.getFeatures();
gate.AnnotationSet tokens = outputAS.get("Token", ann.getStartNode().getOffset(), ann.getEndNode().getOffset());
String lemma = "";
for (Annotation token : tokens) {
lemma = lemma + " " + token.getFeatures().get("root").toString();
}
lookupFeatures.put("lemma",lemma.trim());
}
MultiPhase: Main
Phases:
add_lemma_to_lookup
etox_ilo_trigger_mapping
etox_ilo_domain_mapping
etox_anatomy_mapping
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment