Matthias,

that's what external resources are for.  You declare them
in a descriptor, and they get loaded once by the framework.
See http://incubator.apache.org/uima/downloads/releaseDocs/2.2.2-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.aae.accessing_external_resource_files

A real life example of such an external resource is the
HMM model file of the sandbox Tagger.  Check the HmmTagger.xml
descriptor, IModelResource.java and ModelResource.java.

--Thilo

Matthias Mühlhausen wrote:
Hello,

I have a question concerning the setting of an Object as a configuration parameter for an AnalysisEngine:

We are processing a corpus with several threads of the same UIMA pipeline. There is a very large Java object or "resource" that is used by an AnalysisEngine of this pipeline. it's a Dictionary object that needs between 4 and 12GB memory. We would like to create only one object and use this in all pipelines, because of the memory footprint. I thought it could be possible to create it once and then set it as a configuration parameter for all the components. This does not work, because an AnalysisEngine does not accept to set an Object as a configuration parameter.
So I thought about two solutions yet:

1. we use this component not as a AnalysisEngine but as a POJO and set the Object by a simple setter.

2. using JNDI and resolve the object by a name - but I have no experience with JNDI, so I would like to have somebody's opinion about this approach.


regards
Matthias

Reply via email to