uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: Selecting all connected annotations by type.
Date Sun, 25 Jan 2015 17:47:46 GMT
Hi José,

we had no need for such a method so far ;) The easiest way would probably be to copy the
selectCovering method from uimaFIT and adjust it to catch all intersecting annotations.
You can probably add an optimization to a selectIntersecting method which breaks the loop
as soon as the begin offset of an annotation is larger than the end offset of your intersection


-- Richard

On 24.01.2015, at 22:25, José Tomás Atria <jtatria@gmail.com> wrote:

> Hello all,
> I am looking for the best approach to select all annotations of a given
> type that intersect an annotation of a different type.
> I am aware of selectCovered and selectCovering, which, as far as I
> understand, will select all annotations (of a given type) that cover ranges
> of text which are, respectively, subsets or supersets of another
> annotation. Is there a similar method for annotations that cover ranges
> which merely _intersect_ with the range covered by a given annotation?
> What would the recommended way of achieving this?
> Any help would be apreciated. Thanks!
> jta.
> -- 
> entia non sunt multiplicanda praeter necessitatem

View raw message