resources.NE.number_clean.jape Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annie Show documentation
Show all versions of annie Show documentation
ANNIE is a general purpose information extraction system that
provides the building blocks of many other GATE applications.
Phase: Number_Clean
Input: Percent Money
Options: control = appelt
Rule: PercentDate
Priority: 50
// If there's a Date annotation within a Percent annotation, remove the Date
(
{Percent contains Date}
): tag
-->
{
AnnotationSet tagAS = (AnnotationSet) bindings.get("tag");
AnnotationSet DateAS = inputAS.get("Date", tagAS.firstNode().getOffset(), tagAS.lastNode().getOffset());
outputAS.removeAll(DateAS);
}