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 63733F5DE for ; Wed, 3 Apr 2013 16:15:55 +0000 (UTC) Received: (qmail 29121 invoked by uid 500); 3 Apr 2013 16:15:55 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 28983 invoked by uid 500); 3 Apr 2013 16:15:54 -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 28966 invoked by uid 99); 3 Apr 2013 16:15:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Apr 2013 16:15:54 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.55.86.74] (HELO smtp.webfaction.com) (74.55.86.74) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Apr 2013 16:15:47 +0000 Received: from [10.42.42.108] (modemcable178.127-81-70.mc.videotron.ca [70.81.127.178]) by smtp.webfaction.com (Postfix) with ESMTP id 26EFA20DD651 for ; Wed, 3 Apr 2013 16:15:19 +0000 (UTC) Message-ID: <515C5596.7070202@keatext.com> Date: Wed, 03 Apr 2013 12:15:18 -0400 From: Alexandre Patry Organization: KeaText User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: user@uima.apache.org Subject: Re: Multi-view CAS and sofa-unaware AE References: <515C1E37.4060003@uni-wuerzburg.de> <515C22E3.1030305@gmail.com> <515C465D.9000605@uni-wuerzburg.de> In-Reply-To: <515C465D.9000605@uni-wuerzburg.de> Content-Type: multipart/alternative; boundary="------------030105060801050301010207" X-Virus-Checked: Checked by ClamAV on apache.org --------------030105060801050301010207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 13-04-03 11:10 AM, Peter Kl�gl wrote: > Yes, but imagine you have a CAS with 10 views and you want to apply a > primitive sofa-unaware AE on each view. > > The easiest solution I found was to write a template AAE descriptor, > replaced the AE descriptor and sofa name (and mapping), instantiate the > AAE, call process(), and then repeat that for the next view. > > This can get quite ugly, if you have to override parameters and you do > not know the primitive AE and its parameters. If you are willing to use uimafit, you could do it in a simple for loop. It would look like this : // build an aggregate that will run the same analysis engine on many sofas final AggregateBuilder builder = new AggregateBuilder(); for (String sofa : sofas) { final AnalysisEngineDescription annotator = AnalysisEngineFactory.createPrimitiveDescription(YourEngine.class, paramName1, paramValue1, paramName2, paramValue2, ...); builder.add(annotator, "_InitialView", sofa); } final AnalysisEngine engine = builder.createAggregate(); // you can then user your engine The documentation on the web site ( https://code.google.com/p/uimafit/) is quite good if you want more information. Regards, Alexandre > > Best, > > Peter > > > On 03.04.2013 14:38, J�rn Kottmann wrote: >> Yes, you can use the sofa mapping, to map some view to the _InitialView. >> >> Have a look here: >> http://uima.apache.org/d/uimaj-2.4.0/tutorials_and_users_guides.html#ugr.tug.mvs.sofa_name_mapping >> >> >> J�rn >> >> On 04/03/2013 02:19 PM, Peter Kl�gl wrote: >>> Hi, >>> >>> sorry for this beginner question: >>> >>> It there a shortcut to apply a sofa-unaware AE on CAS view that is not >>> the _InitialView? >>> >>> It seems quite cumbersome to programmatically generate an aggregate >>> analysis engine description to wrap to sofa-unaware engine. >>> >>> Best, >>> >>> Peter >> -- Alexandre Patry, Ph.D Chercheur / Researcher http://KeaText.com >> Transformez vos documents en outils de d�cision << Turn your documents into decision tools --------------030105060801050301010207--