Repository: opennlp Updated Branches: refs/heads/trunk 639b9f0ae -> 9c140512d
Remove deprecated API from the Parser See issue OPENNLP-886 Project: http://git-wip-us.apache.org/repos/asf/opennlp/repo Commit: http://git-wip-us.apache.org/repos/asf/opennlp/commit/9c140512 Tree: http://git-wip-us.apache.org/repos/asf/opennlp/tree/9c140512 Diff: http://git-wip-us.apache.org/repos/asf/opennlp/diff/9c140512 Branch: refs/heads/trunk Commit: 9c140512d9caadda9ea469b679766870304ce947 Parents: 639b9f0 Author: Jörn Kottmann <[email protected]> Authored: Tue Nov 22 01:58:01 2016 +0100 Committer: Jörn Kottmann <[email protected]> Committed: Tue Nov 22 01:58:01 2016 +0100 ---------------------------------------------------------------------- .../opennlp/tools/parser/chunking/Parser.java | 32 -------------------- 1 file changed, 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/opennlp/blob/9c140512/opennlp-tools/src/main/java/opennlp/tools/parser/chunking/Parser.java ---------------------------------------------------------------------- diff --git a/opennlp-tools/src/main/java/opennlp/tools/parser/chunking/Parser.java b/opennlp-tools/src/main/java/opennlp/tools/parser/chunking/Parser.java index 044477b..77a030f 100644 --- a/opennlp-tools/src/main/java/opennlp/tools/parser/chunking/Parser.java +++ b/opennlp-tools/src/main/java/opennlp/tools/parser/chunking/Parser.java @@ -248,15 +248,6 @@ public class Parser extends AbstractBottomUpParser { return newParses; } - /** - * @deprecated Please do not use anymore, use the ObjectStream train methods instead! This method - * will be removed soon. - */ - @Deprecated - public static AbstractModel train(ObjectStream<Event> es, int iterations, int cut) throws java.io.IOException { - return opennlp.tools.ml.maxent.GIS.trainModel(iterations, new TwoPassDataIndexer(es, cut)); - } - public static void mergeReportIntoManifest(Map<String, String> manifest, Map<String, String> report, String namespace) { @@ -318,27 +309,4 @@ public class Parser extends AbstractBottomUpParser { posModel, chunkModel, (opennlp.tools.parser.HeadRules) rules, ParserType.CHUNKING, manifestInfoEntries); } - - /** - * @deprecated use {@link #train(String, ObjectStream, HeadRules, TrainingParameters)} - * instead and pass in a TrainingParameters object. - */ - @Deprecated - public static ParserModel train(String languageCode, ObjectStream<Parse> parseSamples, HeadRules rules, int iterations, int cut) - throws IOException { - - TrainingParameters params = new TrainingParameters(); - params.put("dict", TrainingParameters.CUTOFF_PARAM, Integer.toString(cut)); - - params.put("tagger", TrainingParameters.CUTOFF_PARAM, Integer.toString(cut)); - params.put("tagger", TrainingParameters.ITERATIONS_PARAM, Integer.toString(iterations)); - params.put("chunker", TrainingParameters.CUTOFF_PARAM, Integer.toString(cut)); - params.put("chunker", TrainingParameters.ITERATIONS_PARAM, Integer.toString(iterations)); - params.put("check", TrainingParameters.CUTOFF_PARAM, Integer.toString(cut)); - params.put("check", TrainingParameters.ITERATIONS_PARAM, Integer.toString(iterations)); - params.put("build", TrainingParameters.CUTOFF_PARAM, Integer.toString(cut)); - params.put("build", TrainingParameters.ITERATIONS_PARAM, Integer.toString(iterations)); - - return train(languageCode, parseSamples, rules, params); - } }
