uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Klügl (JIRA) <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-5730) Using parameters of PearSpecifier for configuring wrapped analysis engine description
Date Mon, 09 Jul 2018 07:42:00 GMT

    [ https://issues.apache.org/jira/browse/UIMA-5730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536618#comment-16536618

Peter Klügl commented on UIMA-5730:

We forgot about the documentation.

Yes, the uima-references shold probably mention "parameters", but I currently do not have
an overview of the implementation. The parameters can be used programmatically, but I am not
100% certain that the parser supports it.

Parameter groups are not requires from our side, as other kinds of parameters beside Strings.
I think it can be added later if required.

I would assume that there is no interaction and that overrides are not supported yet for pear.

> Using parameters of PearSpecifier for configuring wrapped analysis engine description
> -------------------------------------------------------------------------------------
>                 Key: UIMA-5730
>                 URL: https://issues.apache.org/jira/browse/UIMA-5730
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>    Affects Versions: 2.10.2SDK
>            Reporter: Peter Klügl
>            Assignee: Peter Klügl
>            Priority: Major
>         Attachments: UIMA-5730.diff, UIMA-5730.diff, analysisEngineWithParameters.pear
> The PearSpecifier provides functionality for setting parameters, which could be used
for configuring the wrapped analysis engine description.
> Matthias Koch wrote: 
> {quote}I want to configure a PEAR dynamically. (I install the pear and want to produce
the analysis engine with different parameters than in the xml). 
> Is this possible? Can I use the additionalParameters? I have seen that the PearSpecifier
has an instance variable for parameters, but no one is using (calling) it. 
> I want to produce the analysisEngine with: UIMAFramework.produceAnalysisEngine(resourceSpecifer,
resourceManager, params); 
> In this specifier there should be one or more pearSpecifiers that should be configured.

> I have overridden the PearAnalysisEngineWrapper and built a loop that configures the
following specifier over the configurationParameterSettings. It takes the parameters from
the pear specifiers. 
> line 257-258 
> // Parse the resource specifier 
> ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

> ==> added code 
> AnalysisEngineDescription analysisEngineDescription = (AnalysisEngineDescription) specifier;

> AnalysisEngineMetaData analysisEngineMetaData = analysisEngineDescription.getAnalysisEngineMetaData();

> ConfigurationParameterSettings configurationParameterSettings = analysisEngineMetaData.getConfigurationParameterSettings();

> for (Parameter parameter : Arrays.asList(pearSpec.getParameters())) { 
> configurationParameterSettings.setParameterValue(parameter.getName(), parameter.getValue());

> }
> {quote}

This message was sent by Atlassian JIRA

View raw message