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 Tue, 08 Dec 2009 16:23:36 GMT


Steven Bethard wrote:
> On Sat, Dec 5, 2009 at 6:00 AM, Marshall Schor <msa@schor.com> wrote:
>   
>> 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).
>>     
>
> Are you saying that support for Maps can't be added to UIMA because of
> interoperability concerns? Or just that since Maps aren't there now,
> trying to use them will cause problems for interoperability?  It
> certainly seems like UIMA could grow Map support - pretty much every
> language has a map type of some sort: C++ STL map, Java HashMap, PHP
> associative array, Python/Ruby dictionary, etc. Apache Thrift, for
> example, supports exchange of all of these, cross-language:
>
>   http://wiki.apache.org/thrift/ThriftTypes
>   

I was saying that Maps are not there now, and that if they are added,
they should be added in a way that preserves the basics of the UIMA idea
- supporting interoperability between Java and C++ being one of these ideas.

-Marshall
> Steve
>
>   
>> 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
>>>
>>>
>>>
>>>       
>
>
>
>   

Mime
View raw message