You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by Damiano Porta <da...@gmail.com> on 2017/01/25 10:45:10 UTC

Adding entries to resources without re-training the TokenNameFinderModel

Hello everybody,
I am using the NameFinder tool with a custom TokenNameFinderModel model.

I built this model using many DictionaryFeatureGenerators that call
dictionaries i have loaded during the training.

TokenNameFinderFactory factory = new TokenNameFinderFactory(
    IOUtils.toByteArray(in),
    defaultResources(), // <---- HERE
    new BioCodec()
);

TokenNameFinderModel model = NameFinderME.train("it", "person",
sampleStream, TrainingParameters.defaultParams(), factory);

It is working but it is tedious. It is tedious because those dictionaries
are added in the model so if i need to add other entries i need to re-train
the model again and again.

So the question is, can I "update" somehow the dictionaries inside the
model without re-train it?

Thank you!
Damiano