Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0AB6910266 for ; Thu, 11 Jul 2013 21:58:09 +0000 (UTC) Received: (qmail 33640 invoked by uid 500); 11 Jul 2013 21:58:08 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 33594 invoked by uid 500); 11 Jul 2013 21:58:08 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 33586 invoked by uid 99); 11 Jul 2013 21:58:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 21:58:08 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of msa@schor.com designates 67.18.82.4 as permitted sender) Received: from [67.18.82.4] (HELO gateway13.websitewelcome.com) (67.18.82.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 21:58:00 +0000 Received: by gateway13.websitewelcome.com (Postfix, from userid 5007) id 442BDAEE95CAE; Thu, 11 Jul 2013 16:57:27 -0500 (CDT) Received: from gator74.hostgator.com (gator74.hostgator.com [184.173.199.208]) by gateway13.websitewelcome.com (Postfix) with ESMTP id 2CBDCAEE95C51 for ; Thu, 11 Jul 2013 16:57:27 -0500 (CDT) Received: from [129.34.20.23] (port=22218 helo=[9.2.211.72]) by gator74.hostgator.com with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1UxOrq-0003BG-RI for user@uima.apache.org; Thu, 11 Jul 2013 16:57:38 -0500 Message-ID: <51DF2A4F.6070008@schor.com> Date: Thu, 11 Jul 2013 17:57:35 -0400 From: Marshall Schor User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: user@uima.apache.org Subject: Re: passing additional metadata to Annotators along with CAS References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 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 - uima.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([9.2.211.72]) [129.34.20.23]:22218 X-Source-Auth: msa+schor.com X-Email-Count: 2 X-Source-Cap: bWlzY2hvcjttaXNjaG9yO2dhdG9yNzQuaG9zdGdhdG9yLmNvbQ== X-Virus-Checked: Checked by ClamAV on apache.org UIMA doesn't really support this kind of use. Examples of where the UIMA "contract" would break include UIMA's ability to take an annotator and run it remotely, in a transparent fashion. To support this kind of flexibility, the CAS is supposed to be the place where data that needs to flow along with the CAS should go. So, what about defining a new type, called for instance, x.y.z.MyMetadata, with any UIMA features you wish, and then making one instance of that? -Marshall On 7/11/2013 5:22 PM, mathaeus wrote: > Hi, > > I'm want to build an Aggregate AnalysisEngine where the Annotators need > additional metadata passed alongside with the CAS for processing. So when > calling the AggregateAnalysisEngine I would like to pass some metadata > > cas = ae.newCAS(); > cas.setDocumentText(testSegment); > cas.setMetadata(keyvaluePairs) > ae.process(cas); > > and the Annotators have access to in their process() method. > > I looked at the getContext() method which is almost what I need with the > exception that I would need to set the context through code (at runtime) > rather than through a configuration file. > > Thanks for your help, Mathaeus > > > >