uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: Uima and spring
Date Mon, 18 Feb 2019 16:04:38 GMT
Hi Sarah,

I don't have knowledge of DKPro or Spring, but here's some general guidance,
which may (or may not) be of use :-).

External Resources are associated with a Resource Manager instance.
Try figuring out how to have one Resource Manager instance be reused for
multiple JCas instances.

Also, try to not have multiple JCas instances, beyond what you need to keep all
the cpu "cores" in your host busy. 
Instead of one new JCas instance per piece of work, reusing existing instances,
by calling myJCasInstance.reset() and then using it again.

Hopefully others with specific knowledge may comment also.


On 2/18/2019 6:48 AM, Sarah wrote:
> Hi,
> I am using uimafit annotators in a spring component. These annotators use external resources.
These resources are currently produced for every JCas even though the Aggregate Engine is
created inside of the Spring component's init and merely the process method is called on the
individual JCas objects. This slows my system down.
> How do I handle external resources appropriately in a spring component. I found the SpringContextResourceManager
but I don’t know how to use it. Can you point me to an example where e.g. the DKPro CoreNLP
Annotators are used in a spring context?
> All the best,
> Sarah

View raw message