Hello,
I am trying to complete an exercise in NLU using UIMA Ruta.
I have hit a wall for the last 3 days.
I would be grateful if you could give a hint on my issue:
I want to create 2 annotations ENTITY and ACTIONS for a list of sentences.
I define a list of words for each one.
Then I want to create a third annotation (INTENT) based on the first 2.
Different values of ENTITY and ACTIONS must combine the 10 different values
of INTENT annotation.
I 've stuck on the final step where I have to create the combined
annotation (with bold).
Could you please help?
I attach my work below.
PACKAGE uima.ruta.exercise;
WORDLIST EntityList = "Entities.txt";
WORDLIST ActionList = "Actions.txt";
DECLARE Annotation ENTITY(STRING value);
DECLARE Annotation ACTIONS(STRING value);
Document{-> RETAINTYPE(BREAK)};
DECLARE Sentence;
BREAK #{->MARK (Sentence)} BREAK;
DECLARE Annotation INTENT(STRING value);
BLOCK(ForEach) Sentence{} {
Document{-> MARKFAST(ENTITY, EntityList)};
Document{-> MARKFAST(ACTIONS, ActionList)};
*Document{-> CREATE(INTENT, "value" =
"Apply_for_Card")}<-{e:ENTITY{e.value=="card"} #
a:ACTIONS{a.value=="application"};}*
*;}*
Thank you,
Anna