string for later compilation using: compile("/it/ /was/ $RELDAY"); env.bind("$RELDAY", "/today|yesterday|tomorrow|tonight|tonite/"); // Bind pre-compiled patter for later compilation using: compile("/it/ /was/ $RELDAY"); env.bind("$RELDAY", TokenSequencePattern.compile(env, "/today|yesterday|tomorrow|tonight|tonite/"));
Bind custom node pattern functions (currently no arguments are supported) // Bind node pattern so we can do patterns like: compile("... temporal::IS_TIMEX_DATE ..."); // (TimexTypeMatchNodePattern is a NodePattern that implements some custom logic) env.bind("::IS_TIMEX_DATE", new TimexTypeMatchNodePattern(SUTime.TimexType.DATE));
Actions (partially implemented)
-
pattern ==> action
- Supported action:
&annotate( { ner="DATE" } )
- Not applied automatically, associated with a pattern.
- To apply, call
pattern.getAction().apply(match, groupid)
@author Angel Chang
@see TokenSequenceMatcher