uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: Implementing a Map as a custom feature for annotation
Date Sat, 05 Dec 2009 14:00:19 GMT
Hi Anton,

The UIMA CAS does not support storing Java Maps in the CAS.  Of course,
any individual annotator written in Java could use Java Maps, internally
within that annotator, as a Java object.  To put it into the CAS, you
would need to do some kind of "export" of it, into data structures the
CAS supports.

One reason for this is to support a wider inter-operability: so that the
CAS you might produce could be sent to another annotator that was
written in C++, for instance (which UIMA does support).


Anton Shuster wrote:
> Hello all,
> I tried my best to search for an answer to this topic but came up
> short. I'm creating an Annotation type and I want to give it a feature
> that is a Map (a HashMap or any other implementation).
> I looked through the documentation, but there is no information on
> creating your own type such as this. All the documentation seems to
> talk about is creating features which inherit the built-in types or
> which inherit other features defined this way.
> Please let me know what's the right way to go about this.
> One usage scenario would be for annotating HTML tags. For example, an
> HTML tag annotation could contain a label String and an attributes
> Map. There are other scenarios as well, but this one is the most
> obvious.
> Thanks for any help,
> --Anton

View raw message