uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Klügl <peter.klu...@averbis.com>
Subject Re: Parameters for PEAR
Date Wed, 13 Dec 2017 12:54:39 GMT
Hi Jens,


Am 13.12.2017 um 09:53 schrieb Jens Grivolla:
> Is there a specific reason to use PEARs?

Yes. An example could be to add a previously unknown annotator with its
implementation in a running system, e.g. without restarting the
application server.
(I am not aware of any other functionality that would support that out
of the box for UIMA.)


>
> As far as I remember (but I could be wrong, it's been a few years), the
> main advantages of using them (automatic class path configuration, some
> degree of isolation between components) was lost when we wanted to change
> configuration parameters because then we would need to use the AE
> descriptor instead of the PEAR descriptor (at least with CPE).

Yes, that's the point. However, just because something does not work,
you do not have to accept it. You could fix the problem even if it is a
limited/special fix for the pear. The PearSpecifier theoretically
supports parameters, but these are just not used in the implementation
of UIMA. I'll comment on that more in an answer to Marshalls post.

>  If you're
> not going to use the PEAR descriptor then an installed PEAR is not much
> more than a bunch of JARs, and component descriptors with tons of
> hard-coded absolute file paths, so you should be able to just use and
> configure a component based on those descriptors (without anything
> PEAR-specific).
>
> We have since switched to doing everything with uimaFIT which gives you
> many many possibilities to adapt your workflow, configure engines
> programatically, etc. For us the change has been hugely positive, both for
> development (and debugging) and for deployment in a wide variety of ways
> and environments.

Yes, we (Averbis) also use uimaFIT everywhere, but PEARs have an
additional use case as I mention above. PEAR and uimaFIT do not need to
be mutually exclusive as you can or course also have a PEAR of a uimaFIT
annotator.


Best,

Peter


PS: nice to hear from you again :-)


> Best,
> Jens
>
> On Tue, Dec 12, 2017 at 8:39 AM, Matthias Koch <matthias.koch@averbis.com>
> wrote:
>
>> 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().p
>> arseResourceSpecifier(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ó
>>
>>

-- 
Peter Klügl
R&D Text Mining/Machine Learning

Averbis GmbH
Tennenbacher Str. 11
79106 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: peter.kluegl@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
View raw message