You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Miguel Alvarez <mi...@gmail.com> on 2016/02/29 07:12:08 UTC

Ruta: limited support of UIMA arrays

Hi Peter,

 

You mentioned that the latest version of RUTA (2.4.0) introduces limited
support of UIMA arrays, but I don't seem to find anything in the
documentation about how to use it. Could you please give me an example of
what is possible? Is it possible to loop through an array of annotations
contained in a feature?

 

Thanks,

Miguel


Re: Ruta: limited support of UIMA arrays

Posted by Peter Klügl <pe...@averbis.com>.
... forgot to answer your question: Yes, it is possible to loop through
an array of annotations
contained in a feature.

Example from the unit test:

DECLARE Inner (FSArray a);
DECLARE Struct (FSArray as);
W{-> CREATE(Inner, a=W)}; // relink each word as the value of a feature
of Inner
Document{-> CREATE(Struct, as=Inner)}; // assign all Inner annotations
to a Struct annotation spanning the complete document
Struct.as{->T1}; // match on all Inner annotations contained in Struct
Struct.as.a{->T2}; // match on all word annotations contained in Inner
annotations, which are contained in each Struct annotation

Best,

Peter

Am 29.02.2016 um 11:16 schrieb Peter Klügl:
> Hi,
>
> I did not add a real documentation by purpose since the functionality is
> not implemented as it should. There was no time left to finish it. The
> parts implemented right now should work nevertheless.
>
> The existing functionlity can best be inspected in the unit tests:
> /ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationFeatureExpressionTest.java
>
> The goal is that the users should be able to use UIMA arrays in a most
> natural way in ruta rules without using extra language contructs.
>
> Best,
>
> Peter
>
> Am 29.02.2016 um 07:12 schrieb Miguel Alvarez:
>> Hi Peter,
>>
>>  
>>
>> You mentioned that the latest version of RUTA (2.4.0) introduces limited
>> support of UIMA arrays, but I don't seem to find anything in the
>> documentation about how to use it. Could you please give me an example of
>> what is possible? Is it possible to loop through an array of annotations
>> contained in a feature?
>>
>>  
>>
>> Thanks,
>>
>> Miguel
>>
>>


Re: Ruta: limited support of UIMA arrays

Posted by Peter Klügl <pe...@averbis.com>.
Hi,

I did not add a real documentation by purpose since the functionality is
not implemented as it should. There was no time left to finish it. The
parts implemented right now should work nevertheless.

The existing functionlity can best be inspected in the unit tests:
/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationFeatureExpressionTest.java

The goal is that the users should be able to use UIMA arrays in a most
natural way in ruta rules without using extra language contructs.

Best,

Peter

Am 29.02.2016 um 07:12 schrieb Miguel Alvarez:
> Hi Peter,
>
>  
>
> You mentioned that the latest version of RUTA (2.4.0) introduces limited
> support of UIMA arrays, but I don't seem to find anything in the
> documentation about how to use it. Could you please give me an example of
> what is possible? Is it possible to loop through an array of annotations
> contained in a feature?
>
>  
>
> Thanks,
>
> Miguel
>
>