uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: UimaFit resources with multiple files
Date Thu, 15 Oct 2015 15:16:35 GMT
Hi Matthias,

I assume you want to use a shared resources so that it can load a model once and share it
amongst multiple instances of an AE. 
If this is not the case, you could as well not use an SR and just load your models in your
AE.

So I assuming that your SR is a container for shared models, you might want not to use a DataResource
at all and just do and implement your own SharedModelResource maybe based on Resource_ImplBase
and implement some getModel(...) method there.

Btw, DKPro Core can optionally set up a shared cache [1] for models in memory (works for some
components). This works without external resources, but is rather implemented as a detail
of DKPro Core's model loading mechanism. It could also be an alternative design for you.

-- Richard

[1] https://github.com/dkpro/dkpro-core/issues/250

On 15.10.2015, at 16:25, Matthias Koch <matthias.koch@averbis.com> wrote:

> Hi
> 
> I want to build a uimafit resource that contains multiple models, so the AnalysisEngine
can choose which model should be used.
> I dont know how many models should be loaded, so i cant load them individually.
> Should i use the DataResource.getUrl() method and load the models in relation to this
url? Or is there a entirely other way to handle that?
> 
> Sincere regards,
> Matthias


Mime
View raw message