Michael Stenger
Michael Stenger

Reputation: 11

How does variable assignment with BooleanExpressions work in UIMA Ruta

I was playing around with variable assignments in Ruta when I stumbled across this script with a result I don't really understand:

DECLARE testType (Annotation ann, BOOLEAN bool1, BOOLEAN bool2);
ANNOTATION a1, a2;
BOOLEAN b1,b2;

d:Document{-> a1=d};

Document{-> b1 = a1==a2};
Document{-> b2 = a1!=a2};

"demo"{->CREATE(testType, "bool1"=b1, "bool2"=b2, "ann"=a2)};

I used the Ruta Workbench 2.8.0 with Eclipse 2019-09 to interpret a simple text file which includes the word "demo". Since I couldn't find any specifics on the VariableAssignmentExpresssion in the Ruta Guide and no exception was throw I expect this to be valid Ruta code. The output is shown in this screenshot of the Annotation Browser. As you can see, both boolean features are false and the "ann" feature is not present at all. What I've expected instead is

Can someone point me to what I'm missing here? Or is this a bug?

Upvotes: 1

Views: 33

Answers (0)

Related Questions