uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Koch <matthias.k...@averbis.com>
Subject Parameters for PEAR
Date Tue, 12 Dec 2017 07:39:10 GMT
Hi,

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());
}

Is it possible without overriding anything?

UIMAJ Version: 2.10

Sincerely
Matthias

-- 
Matthias Koch

Averbis GmbH
Tennenbacher Str. 11
79106 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email:matthias.koch@averbis.com
Web:https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message