Return-Path: Delivered-To: apmail-incubator-uima-user-archive@minotaur.apache.org Received: (qmail 5691 invoked from network); 6 Dec 2009 08:11:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Dec 2009 08:11:11 -0000 Received: (qmail 86612 invoked by uid 500); 6 Dec 2009 08:11:10 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 86512 invoked by uid 500); 6 Dec 2009 08:11:09 -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 86502 invoked by uid 99); 6 Dec 2009 08:11:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2009 08:11:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of steven.bethard@gmail.com designates 209.85.216.188 as permitted sender) Received: from [209.85.216.188] (HELO mail-px0-f188.google.com) (209.85.216.188) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2009 08:11:01 +0000 Received: by pxi26 with SMTP id 26so1383327pxi.21 for ; Sun, 06 Dec 2009 00:10:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=DQagLcsFRHgk7bWPZWGgZ8vw8FBdZ92VZyj4QMhpOgk=; b=lvTXEG/goMJ2FdnspBA68i2D0PzxE7bAw2Wuy9JYrBJl2fC1ey+9BMJgUmOGm5eBZL FYav/bMyApQi8qiyj6PpOT8C3KuqEpWjKt04jmT2C+BEjzWOga0rFznc4mf3LIhuO9mm W9u06Tw1dSTL4OdbEQx0chf2PZeybizLCENDk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DYTyodYgdbD08L21rxCpARJCyXJjTr25HUnrDn+uKeVrfZ3Bi65In3xl/9Lyp40n90 /XVsiC8l4gePX1luwnpgg/kOPwRTFBmqBEukVVxmkzgXeTvx47nWQBfS6wZRRWtjevrt ZcgB0qSoPZM/E0sQFS12+R8406nG69WKoosHs= MIME-Version: 1.0 Received: by 10.142.9.39 with SMTP id 39mr590640wfi.115.1260087039688; Sun, 06 Dec 2009 00:10:39 -0800 (PST) In-Reply-To: <4B1A6773.8080608@schor.com> References: <3c77b7840912041655t53331af1mf1fc54c06c33ee0b@mail.gmail.com> <4B1A6773.8080608@schor.com> Date: Sun, 6 Dec 2009 00:10:39 -0800 Message-ID: Subject: Re: Implementing a Map as a custom feature for annotation From: Steven Bethard To: uima-user@incubator.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Sat, Dec 5, 2009 at 6:00 AM, Marshall Schor wrote: > The UIMA CAS does not support storing Java Maps in the CAS. =C2=A0Of cour= se, > any individual annotator written in Java could use Java Maps, internally > within that annotator, as a Java object. =C2=A0To put it into the CAS, yo= u > 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 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 >> >> >> > --=20 Where did you get that preposterous hypothesis? Did Steve tell you that? --- The Hiphopopotamus