uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kl├╝gl <peter.klu...@averbis.com>
Subject Re: How to use Type comparison?
Date Wed, 14 Jun 2017 08:36:18 GMT
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
>
>
>


Mime
View raw message