I am new to UIMA and trying to annotate a sequence based on Dependencies. I want to annotate the governor and dependent, but want to be able to annotate it no matter which of the two comes first in the sequence.
I think my problem currently is the syntax, this is one of the versions I tried:
INT beginPos;
INT endPos;
(Dependency.DependencyType == "xcomp")->{
{beginPos = Math.min{Dependency.Dependent.begin, Dependency.Governor.begin};
LOG("beginPos: " + beginPos);
{endPos = Math.max{Dependency.Dependent.end, Dependency.Governor.end};
//LOG("beginPos: " + beginPos + ", endPos: " + endPos);
{->CREATE(type.annotation.xxConstruct, "begin" = beginPos, "end" = endPos, "constructID" = 2103)}};};
I get the messages "EarlyExitException" at "{begin", "Expecting SEMI but found =" at "..Pos = Math.min" and "Mismatched Input: {" at "{endPos"
Can someone help me debug this? Thanks!