uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kl├╝gl <pklu...@uni-wuerzburg.de>
Subject Re: Ruta select all annotations with same feature velue.
Date Sat, 28 Feb 2015 16:44:23 GMT
Hi,

this is essentially a mapping from "Annotation -> Feature Value" to 
"Feature Value -> Annotation, Annotation,...", which is not easy to 
specify with regular expressions. Especially since there is no actual 
concept of maps in the ruta language.

Nevertheless, there are several options to approach this in Ruta. Are 
the annotations of the same type or supertype (which specifies the feautre)?

In general, for removing annotations in a more complex setting, you can 
add an annotation, which points to annotations of a specific feature 
value, and then remove that annotation by matching on the feature value 
of the first one. This is of course only reasonable if you know the 
occuring feature values.

You could store all feature values in a list (e.g., STRINGLIST) with a 
rule and remove annotations that have a feature value that is already 
present in that list. You need to store the actual values that caused 
the UNMARK in order to remove also the first annotation that was 
responsible for the feature value in the list.

Does this make sense for you? I could add a few rule examples if you want.

Best,

Peter


Am 27.02.2015 um 14:46 schrieb Silvestre Losada:
> Hi All,
>
> I want to select all the annotations that has the same feature value. In
> case exist more than one annotation with same feature value I want to
> consider them as duplicates and keep only one of them.
> All annotations belongs to same type.
>
> Ann1.feture="valueA"
> Ann2.feture="1"
> Ann3.feture="valueA"
> Ann4.feture="2"
> Ann5.feture="3"
> Ann6.feture="valueA"
>
> Ann1, Ann3 and Ann6 should be selected. Then I plan to use unmark action to
> remove not needed annotations.
>
>
> Kind regards
>


Mime
View raw message