Hi Ofer,

I know of the InlineXmlCasConsumer, but that only does nesting.
Rendering overlapping spans inline is a bit tedious and I believe
it is not very common. When overlap happens, the annotations tend
to become stand-off annotations.

If visualization is what you are after, you could consider rendering
your annotations as JSON and feeding them to brat [1].

Cheers,

-- Richard

[1] http://brat.nlplab.org/embed.html

On 28.05.2014, at 13:28, Ofer Bronstein <[email protected]> wrote:

> Hi guys,
> 
> I have an annotation named Extent that covers a large span, and several
> Head annotations covering small spans in side it.
> 
> For *example *(with simplified representation)
> 
> String extentCoveredText = "I saw Bob, and also Mary, John's sister."
> Head[] heads = {Head(6, 9), Head(20, 39), Head(26, 30)}
> 
> I would like to produce the following String *output*:
> 
> "I saw [Bob], and also [Mary, [John]'s sister]."
> 
> 
> As you can see, the Head spans can overlap and be nested. Adding all the
> '[' and ']' seems like tedious bookkeeping - after adding one, all
> positions change and must be manually updated. This update is especially
> difficult due to the overlaps.
> 
> Is there any existing class that performs this?
> 
> Thank you,
> Ofer Bronstein

Reply via email to