uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: Merging Overlapping Annotations
Date Wed, 16 Jun 2010 12:22:12 GMT


On 6/16/2010 5:21 AM, Alice Lewnes wrote:
> Hi,
>
> Is there any efficient way to merge overlapping annotations of the same type? 
> for example i have a string "...mercedez benz...", and 
> two AEs doing rather similar things aggregated into an AAE. 
> the first AE annotates "mercedez" as, say org.apache.uima.Car, 
> while the second one can only recognize "benz" 
> (hence only annotates "benz" with the type org.apache.uima.Car). 
> Can i merge the two annotations into one, i.e. 
> modify the CAS such that "mercedez benz"
>  is annotated as org.apache.uima.Car? 
>   

Yes.  You can have a recognizer that looks for two adjacent annotations
of Car.  Upon finding this, it could remove the two annotations from the
indexes, and replace them with one annotation whose span covers both tokens.

Or it could just remove one of the annotations, and adjust the other
annotation's begin or end to cover the whole span.

-Marshall
> Thank you in advance. 
>
>
> Regards,
> Alice
>
>
>
>
>
>   

Mime
View raw message