OPENNLP-847 Update to use non-deprecated train method
git-svn-id: https://svn.apache.org/repos/asf/opennlp/trunk@1741478 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/opennlp-uima/src/main/java/opennlp/uima/namefind/NameFinderTrainer.java b/opennlp-uima/src/main/java/opennlp/uima/namefind/NameFinderTrainer.java
index 91059c1..d637c68 100644
--- a/opennlp-uima/src/main/java/opennlp/uima/namefind/NameFinderTrainer.java
+++ b/opennlp-uima/src/main/java/opennlp/uima/namefind/NameFinderTrainer.java
@@ -34,9 +34,11 @@
import opennlp.tools.cmdline.namefind.TokenNameFinderTrainerTool;
import opennlp.tools.ml.maxent.GIS;
+import opennlp.tools.namefind.BioCodec;
import opennlp.tools.namefind.NameFinderME;
import opennlp.tools.namefind.NameSample;
import opennlp.tools.namefind.NameSampleDataStream;
+import opennlp.tools.namefind.TokenNameFinderFactory;
import opennlp.tools.namefind.TokenNameFinderModel;
import opennlp.tools.util.ObjectStream;
import opennlp.tools.util.ObjectStreamUtils;
@@ -399,8 +401,8 @@
resourceMap = Collections.emptyMap();
}
- nameModel = NameFinderME.train(language, null,
- samples, trainingParams, featureGeneratorDefinition, resourceMap);
+ nameModel = NameFinderME.train(language, null, samples, trainingParams,
+ new TokenNameFinderFactory(featureGeneratorDefinition, resourceMap, new BioCodec()));
}
finally {
if (additionalTrainingDataIn != null) {