This little problem has kept me up for a couple of nights now.
I have the following UIMA Ruta script:
(Action.type=="info_req"{->CREATE(CompAction,"type"=Action.type)}
Preposition? Article? ServiceItem{->FILL(CompAction,"target"=ServiceItem, "num_targets"=1),SHIFT(CompAction,1,4)}
(Preposition? Article? ServiceItem)?{
->FILL(CompAction, "target2"=ServiceItem, "num_targets"=2, "selection"="OR") })
{->SHIFT(CompAction,1,1)}
;
It is supposed to match the following sentence:
I want information about the card about the gold credit card
The desired result should be a CompAction Annotation with the following features:
Unfortunately, the result I get is:
i.e. I get the same ServiceItem twice, which seems to be a referencing problem, unless I am doing something very wrong.
For UIMA Ruta 2.1.0: The FILL action considers the complete rule match for the values of the features and, thus, the second FILL action also selects the first suitable annotation. A solution for this problem could be to use different types (subtypes) for the different ServiceItem annotations in order to distinguish them.
For UIMA Ruta 2.2.0: The functionality is implemented and is already available in the current trunk. The rule should do as desired.