Hi Armin,

the Initalizable-concept code relies on having unique parameter names across 
all involved components. For that reason, ClearTK uses fully qualified 
parameter names in the form "my.package.ClassName.parameter" (or similar). This 
code was developed when uimaFIT didn't have support for external resources yet.

Today, I would suggest to use external resources instead, which allow to scope 
the parameters directly to the resources [1].

We are starting to use external resources more today in DKPro Core, not only 
for accessing data, but for general implementations of a "strategy design 
pattern". So that's what I would recommend instead of Initializable.

Apparently, the way that uimaFIT now makes it natural to work with external 
resources for different purposes, has the potential to take the idea of 
external resources to a completely new level. There is still some way to go 
here, both in the UIMA core as well as in uimaFIT.

Cheers,

-- Richard

[1] https://code.google.com/p/uimafit/wiki/ExternalResources

Am 14.06.2013 um 08:45 schrieb [email protected]:

> Hi,
> 
> the following code uses a file namer class of class 
> org.uimafit.factory.initializable.Initializable to create a CAS consumer.
> 
> aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(Writer.class,
>  Writer.PARAM_OUTPUT_DIRECTORY_PATH, "output", 
> Writer.PARAM_FILE_NAMER_CLASS_NAME, FileNamer.class.getName()));
> 
> Writer.PARAM_OUTPUT_DIRECTORY_PATH equals "outputDirectoryPath". FileNamer 
> has a configuration parameter of the same name. So both parameter values are 
> set to "output". That is not what I intended. Only the parameter for Writer 
> should be set. The parameter of FileNamer should stay the default.
> 
> What is the best practice to deal with this?
> 
> Cheers,
> Armin

Reply via email to