You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@opennlp.apache.org by Girivaraprasad Nambari <gi...@gmail.com> on 2013/08/09 06:57:57 UTC

How to load multiple models?

Hi Team,

Can someone help with how to load multiple models?

I have this example code, but right now I am loading only one model, if I
would like to load more than one model, what would I need to do?

InputStream is = new FileInputStream("C:/opennlp/en-ner-organization.bin");

TokenNameFinderModel model = new TokenNameFinderModel(is);
is.close();

NameFinderME nameFinder = new NameFinderME(model);

Any input would be appreciated.

Thanks for your time and help.

Thank you,
Giri

Re: How to load multiple models?

Posted by Girivaraprasad Nambari <gi...@gmail.com>.
Thanks Jorn! Will try that.


On Fri, Aug 9, 2013 at 3:35 AM, Jörn Kottmann <ko...@gmail.com> wrote:

> On 08/09/2013 06:57 AM, Girivaraprasad Nambari wrote:
>
>> I have this example code, but right now I am loading only one model, if I
>> would like to load more than one model, what would I need to do?
>>
>
> Create an array or a collection of the model files names and use a for
> loop to load
> each each model.
>
> Jörn
>

Re: How to load multiple models?

Posted by Jörn Kottmann <ko...@gmail.com>.
On 08/09/2013 06:57 AM, Girivaraprasad Nambari wrote:
> I have this example code, but right now I am loading only one model, if I
> would like to load more than one model, what would I need to do?

Create an array or a collection of the model files names and use a for 
loop to load
each each model.

Jörn