But you can only override something you’ve predefined. I want to specify something that I can’t predefine...
On 24 Jul 2014, at 18:55, Eddie Epstein <[email protected]> wrote: > Right, the only way for "encompassing" descriptors (like aggregates or > CPE) to effect configuration parameters is via overrides. > > Eddie > > > On Thu, Jul 24, 2014 at 11:31 AM, <[email protected]> wrote: > >> I think you’ve misunderstood my question - I’m not asking whether I can >> override defined parameters, I’m asking if I can provide additional >> configuration parameters that aren’t defined in a descriptor file. Let me >> give an example: >> >> 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 >> >> MyCpe.xml uses MyCollectionReader.xml and provides the following >> properties, including some that MyContentExtractor uses but aren’t defined >> above: >> folder - /opt/test >> classname - test.MyContentExtractor >> baseUrl - http://www.example.com >> >> The parameter baseUrl, although it is specified in the MyCpe.xml file, >> isn’t defined in MyCollectionReader.xml because it is specific to the >> MyContentExtractor class and not necessarily known at design time. However, >> UIMA isn’t passing it through to UimaContext presumably because it isn’t >> defined in the MyCollectionReader.xml. >> >> Hope that helps clear it up. >> >> >> On 24 Jul 2014, at 14:51, Eddie Epstein <[email protected]> wrote: >> >>> A CPE descriptor can override configuration parameters defined in any >>> integrated components. >>> Documentation a little bit below >>> >> http://uima.apache.org/d/uimaj-2.6.0/references.html#ugr.ref.xml.cpe_descriptor.descriptor.cas_processors.individual >>> 3.6.1.2. <configurationParameterSettings> Element >>> >>> 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 “ >>> integrated” mode. For Collection Readers and Initializers, it always is >>> available. >>> >>> >>> >>> On Thu, Jul 24, 2014 at 8:19 AM, James Baker <[email protected]> >>> wrote: >>> >>>> 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? >>>> >>>> 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'. >>>> >>>> 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? >>>> >>>> Thanks, >>>> James >>>> >> >>
