Return-Path: Delivered-To: apmail-incubator-uima-user-archive@minotaur.apache.org Received: (qmail 20472 invoked from network); 21 Aug 2009 14:59:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Aug 2009 14:59:05 -0000 Received: (qmail 25696 invoked by uid 500); 21 Aug 2009 14:59:27 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 25641 invoked by uid 500); 21 Aug 2009 14:59:27 -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 25631 invoked by uid 99); 21 Aug 2009 14:59:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Aug 2009 14:59:27 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msa@schor.com designates 67.18.65.20 as permitted sender) Received: from [67.18.65.20] (HELO gateway02.websitewelcome.com) (67.18.65.20) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 21 Aug 2009 14:59:17 +0000 Received: (qmail 13318 invoked from network); 21 Aug 2009 15:06:38 -0000 Received: from gator74.hostgator.com (67.18.27.130) by gateway02.websitewelcome.com with SMTP; 21 Aug 2009 15:06:38 -0000 Received: from yktgi01e0-s5.watson.ibm.com ([129.34.20.19]:36144 helo=[9.2.34.113]) by gator74.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MeVZw-0003yr-Uq for uima-user@incubator.apache.org; Fri, 21 Aug 2009 09:58:57 -0500 Message-ID: <4A8EB631.3030805@schor.com> Date: Fri, 21 Aug 2009 10:58:57 -0400 From: Marshall Schor User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: Creating an aggregate analysis engine on the fly References: <6dfceae40908210147w5eb34281l44659a9318cfa915@mail.gmail.com> In-Reply-To: <6dfceae40908210147w5eb34281l44659a9318cfa915@mail.gmail.com> X-Enigmail-Version: 0.96.0 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 - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-Virus-Checked: Checked by ClamAV on apache.org A good source to explore to see how this can be done is the test cases for uima, which you can find in the uima source code; for instance, look in the project uimaj-core, in the folder src/test/java. One test which might have examples to look at is the class AnalysisEngine_implTest. Of course, that is for Analysis Engines, and not for CPE's. For that, you could look at the tests in the project uimaj-cpe, in the folder src/test/java. In the class CpmProcessingTest, there is a method "setupCpm" that builds a cpe descriptor. HTH. -Marshall Fabio Mancinelli wrote: > Hi everybody, > > I've looked around but I didn't find anything about this, so I am > asking to more expert people. > The use case is the following: > > Imagine you have a set of analysis engines. > By looking at their descriptors you want to synthesize at runtime an > aggregate analysis engine with a custom control flow that takes a > subset of those analysis engines and that is put into a CPE for > execution. > > Now my problem is that since I don't know the analysis engines > beforehand (I discover them at runtime) and the set could also change > during the time, I cannot write an XML descriptor that specify the > aggregate analysis engine. > > One solution to this problem is to have a "template XML" somewhere, > fill it with the references to the analysis engines that will be > chosen for composing the aggregate, write it somewhere and tell the > CPE to use that descriptor for its cas processor . But this solution > look quite clumsy and complicated. > > Is there another way to "manufacture" programmatically an aggregate > analysis engine at runtime in order to realize this use case? > > Thanks, > Fabio > > >