Thanks for the reply.  Yes you are right.  I discovered that the aggregate 
descriptor had to override
the parameter name and then I needed to set it with:

        ae.setConfigParameterValue( "Overridden_Name", "Overridden_Value" 
);

and get it with:

        ae.getConfigParameterValue( "Overridden_Name" )

instead of using the ConfigurationParameterSettings stuff.  Then all the 
primitive descriptors that
use that overridden name can see the change.





"Eddie Epstein" <[EMAIL PROTECTED]> 
05/02/2008 11:09 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: setting aggregate parameters






I'd guess the aggregate descriptor needs to explicitly specify parameter
overrides for those delegate parameters to be controlled at the aggregate
level.

Eddie


On Thu, May 1, 2008 at 7:02 PM, <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> I am fairly new to UIMA.  What I want to do is at run-time pass
> initialization parameters to a UIMA instance started in a Java 
application
> like this:
>
>            File aeDescriptor = new File( "AggregateAnnotator.xml" );
>            XMLInputSource in = new XMLInputSource( aeDescriptor );
>            ResourceSpecifier specifier =
> UIMAFramework.getXMLParser().parseResourceSpecifier( in );
>            ae = UIMAFramework.produceAnalysisEngine( specifier );
>
>            ConfigurationParameterSettings configParamSettings =
> ae.getAnalysisEngineMetaData().getConfigurationParameterSettings();
>            configParamSettings.setParameterValue( "Parameter_Name",
> "Parameter Value" );
>            ae.reconfigure();
>
>            cas = ae.newCAS();
>            cas.setDocumentText( "some text" );
>            ae.process( cas );
>
>            // do some processing with the cas
>            cas.reset();
>
>
> My AggregateAnnotator.xml is an aggregate analysis engine.  I want all 
the
> primitive annotators in it to be able to see  "Parameter_Name" with
> "Parameter Value",
> but when I set it with the above:
>
>            configParamSettings.setParameterValue( "Parameter_Name",
> "Parameter Value" );
>
> the annotator's code all just see the default parameter value specified 
in
> the xml.  Any help would be appreciated.
>
> Larry
>
>

Reply via email to