You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Reza Hay <re...@gmail.com> on 2017/06/13 13:51:20 UTC
How to use Type comparison?
Hi All,
The following Ruta (2.6.0) statement gives me correct answer:
TYPESYSTEM Types.DKPROTypeSystem;
IMPORT de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.ROOT FROM Types.DKPROTypeSystem AS DEP_ROOT;
DEP_ROOT{DEP_ROOT.Governor.pos.PosValue == "VBZ" -> LOG("root: " + DEP_ROOT.Governor.pos.ct)};
However, the following statement (comparing types) results in empty output:
DEP_ROOT{DEP_ROOT.Governor.pos == VERB -> LOG("root: " + DEP_ROOT.Governor.pos.ct)};
Isn't it possible to compare types as I did?
Regards,
Reza
Re: How to use Type comparison?
Posted by Peter Klügl <pe...@averbis.com>.
Hi,
there is a mixup between annotations and types here and type expressions
on annotation expressions are not yet implemented. Else you could write
DEP_ROOT.Governor.pos.type==VERB;
Something like this could mabye help you:
DEP_ROOT.Governor.pos{IS(VERB)};
or
DEP_ROOT<-{DEP_ROOT.Governor.pos{IS(VERB)};};
if you do not want to change the match context of the rule element.
btw I personally use label expressions more and more since they avoid
ambiguities when resolving an annotation given a type expression.
root:DEP_ROOT<-{root.Governor.pos{IS(VERB)};};
Best,
Peter
Am 13.06.2017 um 15:51 schrieb Reza Hay:
> Hi All,
>
> The following Ruta (2.6.0) statement gives me correct answer:
> TYPESYSTEM Types.DKPROTypeSystem;
> IMPORT de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.ROOT FROM Types.DKPROTypeSystem AS DEP_ROOT;
>
> DEP_ROOT{DEP_ROOT.Governor.pos.PosValue == "VBZ" -> LOG("root: " + DEP_ROOT.Governor.pos.ct)};
>
> However, the following statement (comparing types) results in empty output:
> DEP_ROOT{DEP_ROOT.Governor.pos == VERB -> LOG("root: " + DEP_ROOT.Governor.pos.ct)};
>
> Isn't it possible to compare types as I did?
>
> Regards,
> Reza
>
>
>