Hi Niels,
you might want to try to modify what you call the 'specifier' (I guess its a
AnalysisEngineDescription) before you call
UIMAFramework.produceAnalysisEngine(specifier)
I used this in Unit tests during setup, something like this:
--------
URL descResource = LexProcessingWriterTest.class.getClassLoader().getResource(
"MyDescriptor.xml");
AnalysisEngineDescription) aeDescription =
UIMAFramework.getXMLParser().parseAnalysisEngineDescription(
new XMLInputSource(descResource));
ConfigurationParameterSettings settings =
aeDescription.getAnalysisEngineMetaData().getConfigurationParameterSettings();
------------
Now that you have the settings you can set/overwrite values like:
settings.setParameterValue(name, value);
At the end when you produce the analysis engine with the modified values there
shouldn't be any problem:
myAE = UIMAFramework.produceAnalysisEngine(aeDescription);
Hope that helps,
Christoph
Niels Ott schrieb:
> Hello everybody,
>
> I'm new to this mailing list, however I'm not so new to UIMA.
>
> Here's my issue: I am trying to set the parameters of an Aggregate AE
> from within my Java program.
>
> I tried the following the solution I found here:
> http://www.mail-archive.com/uima-user@incubator.apache.org/msg01241.html#
>
> which is basically to produce an annotator and then to configure it using
>
> annotator.setConfigParameterValue("ParamName","NewValue");
>
> This does not work for me as
>
> annotator = UIMAFramework.produceAnalysisEngine(specifier);
>
> which I'm using before to produce the Aggregate initializes its AEs with
> the default parameters. These default parameters are of course not
> suitable for use in the given scenario, causing the initialization to
> fail before I correct the configuration.
>
> I tried to use
>
> produceAnalysisEngine(ResourceSpecifier aSpecifier, Map
> aAdditionalParams)
>
> instead but the additional parameters don't do the job. Perhaps I
> misunderstood the purpose of these additional parameters in the function.
>
> How can I specify the parameteres of an (Aggregate) AE before it is
> initialized?
>
> Thank you very much for your assistance.
>
> Best,
>
> Niels Ott
>
>
>
--
--------------------------------
Christoph Büscher
Softwareentwicklung
neofonie
Technologieentwicklung und
Informationsmanagement GmbH
Robert-Koch-Platz 4
10115 Berlin
fon: +49.30 24627 522
fax: +49.30 24627 120
http://www.neofonie.de
Handelsregister
Berlin-Charlottenburg: HRB 67460
Geschäftsführung
Helmut Hoffer von Ankershoffen
Nurhan Yildirim
Uwe-Gernot Fasold
--------------------------------
|