Author: joern
Date: Wed Apr 27 08:49:41 2016
New Revision: 1741167
URL: http://svn.apache.org/viewvc?rev=1741167&view=rev
Log:
OPENNLP-847 Change visibility of deprecated train methods.
The train methods should not be possible to use anymore by client code.
Some of the methods allow training models which can't be instantiated
afterwards.
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=1741167&r1=1741166&r2=1741167&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 Apr 27 08:49:41 2016
@@ -314,7 +314,7 @@ public class NameFinderME implements Tok
* instead.
*/
@Deprecated
- public static TokenNameFinderModel train(String languageCode, String type,
ObjectStream<NameSample> samples,
+ static TokenNameFinderModel train(String languageCode, String type,
ObjectStream<NameSample> samples,
TrainingParameters trainParams, AdaptiveFeatureGenerator generator,
final Map<String, Object> resources)
throws IOException {
@@ -399,7 +399,7 @@ public class NameFinderME implements Tok
* instead.
*/
@Deprecated
- public static TokenNameFinderModel train(String languageCode, String type,
+ static TokenNameFinderModel train(String languageCode, String type,
ObjectStream<NameSample> samples, TrainingParameters trainParams,
byte[] featureGeneratorBytes, final Map<String, Object> resources)
throws IOException {
@@ -415,18 +415,6 @@ public class NameFinderME implements Tok
}
/**
- * @deprecated use
- * {@link NameFinderME#train(String, String, ObjectStream,
TrainingParameters, TokenNameFinderFactory)}
- * instead.
- */
- @Deprecated
- public static TokenNameFinderModel train(String languageCode, String type,
ObjectStream<NameSample> samples,
- final Map<String, Object> resources) throws IOException {
- return NameFinderME.train(languageCode, type, samples,
- ModelUtil.createDefaultTrainingParameters(), (byte[]) null,
resources);
- }
-
- /**
* Gets the name type from the outcome
*
* @param outcome the outcome