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 C2294FDC7 for ; Sun, 14 Apr 2013 06:43:07 +0000 (UTC) Received: (qmail 51078 invoked by uid 500); 14 Apr 2013 06:43:07 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 50946 invoked by uid 500); 14 Apr 2013 06:43:07 -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 50925 invoked by uid 99); 14 Apr 2013 06:43:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Apr 2013 06:43:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of richard.eckart@gmail.com designates 74.125.83.44 as permitted sender) Received: from [74.125.83.44] (HELO mail-ee0-f44.google.com) (74.125.83.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Apr 2013 06:43:01 +0000 Received: by mail-ee0-f44.google.com with SMTP id c41so1754722eek.17 for ; Sat, 13 Apr 2013 23:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=5Lxp/u2AwX09d78z6QdVHH0Q65AKJSUIUGbKnMiDQ+A=; b=GwY45eZE9HuMSlDC9YMiyZ2JE/OKpDdm8TBZPlbzCNxha6TG3/tqHXzPyQo19FMk+Y qdS9DXtSGYspqBDXtNp3f95okKMyrv0Pb0TGPcqsrDOpgdcyu0Oh5/LZCGqBW07Z6Zxw 7cCaReGik3EPjU1qH+97SsJX4ffbgwXckEMUbra24XSV9ueYxfs17rfX8kSz8VY05y7J /t+tQwHTGaAlc0hn/LyHbFyxgYJv830N06Yd/5Xst6uc4OIKUTkyo1deiyNFGRjGUz1i SDGtKCp+PyHNjXs4f7YpGfzaoBJCgUKEF7lsayJ20dOCTBS9snSzmhz5Ym67KJIcXkAf wKEw== X-Received: by 10.15.81.136 with SMTP id x8mr3775316eey.9.1365921759985; Sat, 13 Apr 2013 23:42:39 -0700 (PDT) Received: from [10.0.1.20] (ip-178-200-235-87.unitymediagroup.de. [178.200.235.87]) by mx.google.com with ESMTPS id x42sm688338eee.0.2013.04.13.23.42.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Apr 2013 23:42:36 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: UIMA ResultSpecification From: Richard Eckart de Castilho In-Reply-To: <516A3C7C.8030901@schor.com> Date: Sun, 14 Apr 2013 08:42:34 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <475118F1-8E2B-4259-ACD0-3556E5470708@gmail.com> References: <51695464.1020108@uni-wuerzburg.de> <516A3C7C.8030901@schor.com> To: user@uima.apache.org X-Mailer: Apple Mail (2.1503) X-Virus-Checked: Checked by ClamAV on apache.org The call >> AnalysisEngineFactory.createPrimitiveDescription(TestEngine.class); Scans the classpath for all type system descriptors, loads them and merges them. How this is done and how types can be made detectable is documented here: https://code.google.com/p/uimafit/wiki/TypeDescriptorDetection Btw. I've been playing with the thought of adding support for = result-specs to uimaFIT. I'm thinking of something that starts with all the types=20 declared by the component, which then allows easy removal of undesired types (which has so far been my most prominent use-case) without having to explicitly specify all types that should be in the result. Cheers, -- Richard Am 14.04.2013 um 07:19 schrieb Marshall Schor : > =46rom the source code you posted, it appears you are using UIMAFit, = is this correct? >=20 > How are you specifying the UIMA Type system (which would need to = contain a > definition for the type "test") for this? >=20 > -Marshall >=20 > On 4/13/2013 8:49 AM, Georg Fette wrote: >> Hello, >> I have a problem in understanding how to use the class = "ResultSpecification". >> I thought that before I call "process(cas)" I configure an instance = of >> ResultSpecification by adding types which have to be produced in the = process >> call. My test code looks like this: >>=20 >> MainClass: >> ------------------ >> AnalysisEngineDescription aed =3D >> AnalysisEngineFactory.createPrimitiveDescription(TestEngine.class); >> AnalysisEngine ae =3D AnalysisEngineFactory.createPrimitive(aed); >> ResultSpecification resultSpec =3D >> = UIMAFramework.getResourceSpecifierFactory().createResultSpecification(); >> resultSpec.addResultType("test", true); >> CAS cas =3D CasCreationUtils.createCas(aed); >> ae.process(cas, resultSpec); >>=20 >> TestEngine: >> ------------------------- >> @Override >> public void process(JCas arg0) throws = AnalysisEngineProcessException { >> ResultSpecification resultSpec =3D getResultSpecification(); >> TypeOrFeature[] types =3D = resultSpec.getResultTypesAndFeatures(); >> } >>=20 >> Unfortunately the types-array in is retured by the resultSpec in the = enginge's >> process method is always empty. >> What am I doing wrong ? >> Greetings >> Georg >>=20 >=20