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 7E16411F09 for ; Thu, 24 Jul 2014 19:23:11 +0000 (UTC) Received: (qmail 88078 invoked by uid 500); 24 Jul 2014 19:23:11 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 88041 invoked by uid 500); 24 Jul 2014 19:23:11 -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 88029 invoked by uid 99); 24 Jul 2014 19:23:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 19:23:10 +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 (nike.apache.org: domain of james.d.baker@gmail.com designates 74.125.82.173 as permitted sender) Received: from [74.125.82.173] (HELO mail-we0-f173.google.com) (74.125.82.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 19:23:06 +0000 Received: by mail-we0-f173.google.com with SMTP id q58so3199061wes.18 for ; Thu, 24 Jul 2014 12:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=Sm6UC1E91/FYKBvT9hg0iD28IJM0o/qDSD4j13skSls=; b=PL2RDmj/UYSBqIASO7v6YZCUnA08PS/v5gbeFK7BzyROYe7DXqWyCvxeT6OMNyaUeX vHJYVU3zLEcbnP1wTKksIAuQsq4i2hnZv6FVtgAMnW3OLWzOOIyo5en2SEf7oCt3MrOS yYpS7o7udrJpEUXG7UHfJitMsQ8gfCAKGiJD9GE42I3rr02NygckVIxuOrmlT5Hi1cMF e2SojqNRBCgbtMW1G8YJ7uVTHLGh8Pm9/O0S0jlUM//+WtnI4bKTvvIf8aY+Gs/DnGIM kNl6LuslLMqMN2O5nQae5tV3LojqrJZ11bymTwUedkGpArmA/Z5rb2YA+rnB0MG97ebT odKw== X-Received: by 10.180.86.199 with SMTP id r7mr15726169wiz.20.1406229759737; Thu, 24 Jul 2014 12:22:39 -0700 (PDT) Received: from [192.168.0.3] ([2.31.125.179]) by mx.google.com with ESMTPSA id 19sm18359215wjz.3.2014.07.24.12.22.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jul 2014 12:22:38 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Passing additional parameters through to CPE components From: james.d.baker@gmail.com In-Reply-To: Date: Thu, 24 Jul 2014 20:22:36 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <6EB458FF-9C9B-4083-A58D-FE9CC9187AD2@gmail.com> To: user@uima.apache.org X-Mailer: Apple Mail (2.1878.6) X-Virus-Checked: Checked by ClamAV on apache.org But you can only override something you=92ve predefined. I want to = specify something that I can=92t predefine... On 24 Jul 2014, at 18:55, Eddie Epstein wrote: > Right, the only way for "encompassing" descriptors (like aggregates or > CPE) to effect configuration parameters is via overrides. >=20 > Eddie >=20 >=20 > On Thu, Jul 24, 2014 at 11:31 AM, wrote: >=20 >> I think you=92ve misunderstood my question - I=92m not asking whether = I can >> override defined parameters, I=92m asking if I can provide additional >> configuration parameters that aren=92t defined in a descriptor file. = Let me >> give an example: >>=20 >> MyCollectionReader.xml defines the following properties: >> folder [String] - The folder to process files from >> classname [String] - The qualified class name of a class >> implementing my ContentExtractor interface >>=20 >> MyCpe.xml uses MyCollectionReader.xml and provides the following >> properties, including some that MyContentExtractor uses but aren=92t = defined >> above: >> folder - /opt/test >> classname - test.MyContentExtractor >> baseUrl - http://www.example.com >>=20 >> The parameter baseUrl, although it is specified in the MyCpe.xml = file, >> isn=92t defined in MyCollectionReader.xml because it is specific to = the >> MyContentExtractor class and not necessarily known at design time. = However, >> UIMA isn=92t passing it through to UimaContext presumably because it = isn=92t >> defined in the MyCollectionReader.xml. >>=20 >> Hope that helps clear it up. >>=20 >>=20 >> On 24 Jul 2014, at 14:51, Eddie Epstein wrote: >>=20 >>> A CPE descriptor can override configuration parameters defined in = any >>> integrated components. >>> Documentation a little bit below >>>=20 >> = http://uima.apache.org/d/uimaj-2.6.0/references.html#ugr.ref.xml.cpe_descr= iptor.descriptor.cas_processors.individual >>> 3.6.1.2. Element >>>=20 >>> This element provides a way to override the contained Analysis = Engine's >>> parameters settings. Any entry specified here must already be = defined; >>> values specified replace the corresponding values for each = parameter. For >>> Cas Processors, this mechanism is only available when they are = deployed >> in =93 >>> integrated=94 mode. For Collection Readers and Initializers, it = always is >>> available. >>>=20 >>>=20 >>>=20 >>> On Thu, Jul 24, 2014 at 8:19 AM, James Baker = >>> wrote: >>>=20 >>>> Is it possible to provide additional configuration parameters in a = CPE >>>> descriptor XML file that aren't specified in the = annotator/collection >>>> reader descriptor XML file? >>>>=20 >>>> I have a collection reader that accepts the classname of a class to = use >> to >>>> do the content extraction as a parameter. This works fine, but I'd = like >> to >>>> be able to pass additional parameters to the content extractor via = the >> XML. >>>> The parameters will be dependant on the content extractor though, = so I >>>> can't specify them in the collection reader descriptor. For = example, >>>> ContentExtractor1 might need a parameter 'encoding', and >> ContentExtractor2 >>>> might need a parameter 'baseUrl'. >>>>=20 >>>> I have been able to achieve this with UimaFIT by creating the = collection >>>> reader without the XML and injecting the parameters, but when I try = and >> do >>>> it from the XML file the parameters don't make it through to my = content >>>> extractor (I pass the UimaContext object through to the content >> extractor). >>>> I suspect they might be being ignored by UIMA because they aren't = in the >>>> descriptor. How can I work around this? >>>>=20 >>>> Thanks, >>>> James >>>>=20 >>=20 >>=20