On 13.11.2013, at 07:24, Swirl <[email protected]> wrote:

> According to documentation for UimaFit 2.0 (http://uima.apache.org/d/uimafit-
> current/tools.uimafit.book.html), the method 
> ConfigurationParameterFactory.createConfigurationParameterName() that was 
> used 
> to generate the prefixed name has been removed.
> 
> Does that mean the recommendation for naming parameters would be only the 
> field name and no longer needed to be prefixed with the class name?

Yes.

> What was the advantage of createConfigurationParameterName() then?

uimaFIT started out as uutuc and initially was written by the same
people doing ClearTK at the time. Prefixing the parameter names with
the class name is a legacy of ClearTK. 

At the time, there was no support for UIMA shared resources in uimaFIT/uutuc.
Instead, a custom substitute for shared resources was developed around the
uimaFIT/uutuc interface "Initializable" [1]. Btw. the interface should also
be deprecated at some point. Looks like I missed that opportunity when doing
the 2.0.0 release.

In ClearTK, in particular in the machine learning module, there were
analysis engines for learning classifiers. However, there wasn't one
AE per training algorithm, rather one passed in the name of a class which
implemented such an algorithm was passed to the AE, along with any parameters
that the algorithm would require. The AE would then instantiate that algorithm
and pass parameters on to it. In order to tell apart which parameters were
meant for the AE and which were actually meant for the instantiated algorithm,
the prefix was used. The same basic principle was also used in other places in
ClearTK

This approach worked ok for ClearTK, but it doesn't work in general because
the prefixing just defers name clashes, it doesn't prevent them. 

Today uimaFIT provides good support for shared resources. Instead of passing a
class name to an AE and let the AE handle instantiation and initialization, one
would pass a shared resource to the AE and let UIMA/uimaFIT handle instantiation
and initialization. Each resource can have its own parameters and there are no
name clashes, even if an AE is configured with multiple resources of the same 
type.
For more details, check out the uimaFIT documentation on shared resources [2].

> I am still using uimafit 1.4 but I am considering removing all usages of 
> ConfigurationParameterFactory.createConfigurationParameterName() from my 
> codes 
> if there are no serious implications of doing that.

If you do not pass around parameters, there shouldn't be negative implications.

Cheers,

-- Richard

[1] 
http://uima.apache.org/d/uimafit-2.0.0/api/org/apache/uima/fit/factory/initializable/Initializable.html
[2] 
http://uima.apache.org/d/uimafit-current/tools.uimafit.book.html#ugr.tools.uimafit.externalresources

Reply via email to