Return-Path: Delivered-To: apmail-incubator-uima-user-archive@minotaur.apache.org Received: (qmail 81158 invoked from network); 8 Dec 2009 16:23:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Dec 2009 16:23:51 -0000 Received: (qmail 29018 invoked by uid 500); 8 Dec 2009 16:23:50 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 28980 invoked by uid 500); 8 Dec 2009 16:23:50 -0000 Mailing-List: contact uima-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-user@incubator.apache.org Delivered-To: mailing list uima-user@incubator.apache.org Received: (qmail 28970 invoked by uid 99); 8 Dec 2009 16:23:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2009 16:23:50 +0000 X-ASF-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msa@schor.com designates 69.93.243.14 as permitted sender) Received: from [69.93.243.14] (HELO gateway15.websitewelcome.com) (69.93.243.14) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 08 Dec 2009 16:23:48 +0000 Received: (qmail 13479 invoked from network); 8 Dec 2009 16:38:47 -0000 Received: from gator74.hostgator.com (67.18.27.130) by gateway15.websitewelcome.com with SMTP; 8 Dec 2009 16:38:47 -0000 Received: from yktgi01e0-s5.watson.ibm.com ([129.34.20.19]:24570 helo=[9.2.35.72]) by gator74.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NI2qT-0003TQ-Nw for uima-user@incubator.apache.org; Tue, 08 Dec 2009 10:23:25 -0600 Message-ID: <4B1E7D88.5040606@schor.com> Date: Tue, 08 Dec 2009 11:23:36 -0500 From: Marshall Schor User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: Implementing a Map as a custom feature for annotation References: <3c77b7840912041655t53331af1mf1fc54c06c33ee0b@mail.gmail.com> <4B1A6773.8080608@schor.com> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator74.hostgator.com X-AntiAbuse: Original Domain - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com Steven Bethard wrote: > On Sat, Dec 5, 2009 at 6:00 AM, Marshall Schor 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 >>> >>> >>> >>> > > > >