You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2015/11/04 15:49:01 UTC
svn commit: r1712561 -
/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/namefind/NameFinderME.java
Author: joern
Date: Wed Nov 4 14:49:01 2015
New Revision: 1712561
URL: http://svn.apache.org/viewvc?rev=1712561&view=rev
Log:
OPENNLP-823 Removed deprecated constructors
Modified:
opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/namefind/NameFinderME.java
Modified: opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/namefind/NameFinderME.java
URL: http://svn.apache.org/viewvc/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/namefind/NameFinderME.java?rev=1712561&r1=1712560&r2=1712561&view=diff
==============================================================================
--- opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/namefind/NameFinderME.java (original)
+++ opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/namefind/NameFinderME.java Wed Nov 4 14:49:01 2015
@@ -94,77 +94,6 @@ public class NameFinderME implements Tok
new WindowFeatureGenerator(additionalContextFeatureGenerator, 8, 8));
}
- /**
- * Initializes the name finder with the specified model.
- *
- * @param model
- * @param beamSize
- *
- * @deprecated the beam size is now configured during training time in the
- * trainer parameter file via beamSearch.beamSize
- *
- * @deprecated Use {@link #NameFinderME(TokenNameFinderModel)} instead and use
- * the {@link TokenNameFinderFactory} to configure it.
- */
- @Deprecated
- public NameFinderME(TokenNameFinderModel model, AdaptiveFeatureGenerator generator, int beamSize,
- SequenceValidator<String> sequenceValidator) {
-
- seqCodec = model.getFactory().createSequenceCodec();
-
- this.sequenceValidator = sequenceValidator;
-
- // TODO: getNameFinderModel should be removed! Instead the model should always return
- // a sequence classification model
- // To maintain backward compatibility this should be done later, e.g. for 1.7.0
- if (model.getNameFinderSequenceModel() != null) {
- this.model = model.getNameFinderSequenceModel();
- } else {
- this.model = new opennlp.tools.ml.BeamSearch<String>(beamSize,
- model.getNameFinderModel());
- }
-
- // If generator is provided always use that one
- if (generator != null) {
- contextGenerator = new DefaultNameContextGenerator(generator);
- } else {
- // If model has a generator use that one, otherwise create default
- AdaptiveFeatureGenerator featureGenerator = model.createFeatureGenerators();
-
- if (featureGenerator == null) {
- featureGenerator = createFeatureGenerator();
- }
-
- contextGenerator = new DefaultNameContextGenerator(featureGenerator);
- }
-
- // NOTE: This didn't turn out to work well ... anybody using this actually ?!
- contextGenerator.addFeatureGenerator(
- new WindowFeatureGenerator(additionalContextFeatureGenerator, 8, 8));
-
- if (this.sequenceValidator == null) {
- this.sequenceValidator = new NameFinderSequenceValidator();
- }
- }
-
- /**
- * @deprecated the beam size is now configured during training time in the
- * trainer parameter file via beamSearch.beamSize
- */
- @Deprecated
- public NameFinderME(TokenNameFinderModel model, AdaptiveFeatureGenerator generator, int beamSize) {
- this(model, generator, beamSize, null);
- }
-
- /**
- * @deprecated the beam size is now configured during training time in the
- * trainer parameter file via beamSearch.beamSize
- */
- @Deprecated
- public NameFinderME(TokenNameFinderModel model, int beamSize) {
- this(model, null, beamSize);
- }
-
@Deprecated
/**
* @deprecated the default feature generation is now always included in the models and loaded