[08/50] [abbrv] opennlp git commit: OpenNLP-977: Remove deprecated map methods
OpenNLP-977: Remove deprecated map methods Project: http://git-wip-us.apache.org/repos/asf/opennlp/repo Commit: http://git-wip-us.apache.org/repos/asf/opennlp/commit/203ea174 Tree: http://git-wip-us.apache.org/repos/asf/opennlp/tree/203ea174 Diff: http://git-wip-us.apache.org/repos/asf/opennlp/diff/203ea174 Branch: refs/heads/parser_regression Commit: 203ea174801a303584c4a436c6af50d0f1a810f4 Parents: 5b8535b Author: Daniel RussAuthored: Mon Feb 6 13:39:59 2017 -0500 Committer: Jörn Kottmann Committed: Thu Apr 20 12:40:18 2017 +0200 -- .../java/opennlp/tools/chunker/ChunkerME.java | 6 +- .../java/opennlp/tools/cmdline/CmdLineUtil.java | 4 +- .../tools/cmdline/parser/ParserTrainerTool.java | 10 +-- .../cmdline/postag/POSTaggerTrainerTool.java| 2 +- .../sentdetect/SentenceDetectorTrainerTool.java | 2 +- .../cmdline/tokenizer/TokenizerTrainerTool.java | 4 +- .../tools/doccat/DocumentCategorizerME.java | 2 +- .../opennlp/tools/lemmatizer/LemmatizerME.java | 8 +- .../tools/ml/EventModelSequenceTrainer.java | 3 + .../java/opennlp/tools/ml/EventTrainer.java | 3 + .../java/opennlp/tools/ml/SequenceTrainer.java | 3 + .../java/opennlp/tools/ml/TrainerFactory.java | 83 +--- .../opennlp/tools/namefind/NameFinderME.java| 8 +- .../opennlp/tools/parser/chunking/Parser.java | 4 +- .../opennlp/tools/parser/treeinsert/Parser.java | 6 +- .../java/opennlp/tools/postag/POSTaggerME.java | 8 +- .../tools/sentdetect/SentenceDetectorME.java| 2 +- .../opennlp/tools/tokenize/TokenizerME.java | 2 +- .../java/opennlp/tools/ml/MockEventTrainer.java | 6 ++ .../opennlp/tools/ml/MockSequenceTrainer.java | 6 ++ .../opennlp/tools/ml/TrainerFactoryTest.java| 12 +-- .../tools/ml/maxent/GISIndexingTest.java| 4 +- .../tools/ml/maxent/MaxentPrepAttachTest.java | 5 +- .../ml/maxent/quasinewton/QNPrepAttachTest.java | 11 ++- .../ml/naivebayes/NaiveBayesPrepAttachTest.java | 5 +- .../ml/perceptron/PerceptronPrepAttachTest.java | 11 ++- .../java/opennlp/uima/util/OpennlpUtil.java | 4 +- 27 files changed, 114 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/opennlp/blob/203ea174/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java -- diff --git a/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java b/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java index a59b5ce..71917fb 100644 --- a/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java +++ b/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java @@ -171,7 +171,7 @@ public class ChunkerME implements Chunker { Map manifestInfoEntries = new HashMap<>(); -TrainerType trainerType = TrainerFactory.getTrainerType(mlParams.getSettings()); +TrainerType trainerType = TrainerFactory.getTrainerType(mlParams); MaxentModel chunkerModel = null; @@ -179,13 +179,13 @@ public class ChunkerME implements Chunker { if (TrainerType.EVENT_MODEL_TRAINER.equals(trainerType)) { ObjectStream es = new ChunkerEventStream(in, factory.getContextGenerator()); - EventTrainer trainer = TrainerFactory.getEventTrainer(mlParams.getSettings(), + EventTrainer trainer = TrainerFactory.getEventTrainer(mlParams, manifestInfoEntries); chunkerModel = trainer.train(es); } else if (TrainerType.SEQUENCE_TRAINER.equals(trainerType)) { SequenceTrainer trainer = TrainerFactory.getSequenceModelTrainer( - mlParams.getSettings(), manifestInfoEntries); + mlParams, manifestInfoEntries); // TODO: This will probably cause issue, since the feature generator uses the outcomes array http://git-wip-us.apache.org/repos/asf/opennlp/blob/203ea174/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java -- diff --git a/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java b/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java index 6855898..7ea2a0b 100644 --- a/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java +++ b/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java @@ -324,11 +324,11 @@ public final class CmdLineUtil { throw new TerminateToolException(-1, "Error during parameters loading: " + e.getMessage(), e); } - if (!TrainerFactory.isValid(params.getSettings())) { + if (!TrainerFactory.isValid(params)) { throw new TerminateToolException(1, "Training parameters file '" + paramFile + "' is invalid!"); } - TrainerFactory.TrainerType trainerType =
[05/50] [abbrv] opennlp git commit: OpenNLP-977: Remove deprecated map methods
OpenNLP-977: Remove deprecated map methods Project: http://git-wip-us.apache.org/repos/asf/opennlp/repo Commit: http://git-wip-us.apache.org/repos/asf/opennlp/commit/51cd8091 Tree: http://git-wip-us.apache.org/repos/asf/opennlp/tree/51cd8091 Diff: http://git-wip-us.apache.org/repos/asf/opennlp/diff/51cd8091 Branch: refs/heads/parser_regression Commit: 51cd80914b9cddb5771232929b1e9326cecc6170 Parents: 212cf14 Author: Daniel RussAuthored: Mon Feb 6 13:39:59 2017 -0500 Committer: Jörn Kottmann Committed: Sun Apr 16 19:24:51 2017 +0200 -- .../java/opennlp/tools/chunker/ChunkerME.java | 6 +- .../java/opennlp/tools/cmdline/CmdLineUtil.java | 4 +- .../tools/cmdline/parser/ParserTrainerTool.java | 10 +-- .../cmdline/postag/POSTaggerTrainerTool.java| 2 +- .../sentdetect/SentenceDetectorTrainerTool.java | 2 +- .../cmdline/tokenizer/TokenizerTrainerTool.java | 4 +- .../tools/doccat/DocumentCategorizerME.java | 2 +- .../opennlp/tools/lemmatizer/LemmatizerME.java | 8 +- .../tools/ml/EventModelSequenceTrainer.java | 3 + .../java/opennlp/tools/ml/EventTrainer.java | 3 + .../java/opennlp/tools/ml/SequenceTrainer.java | 3 + .../java/opennlp/tools/ml/TrainerFactory.java | 83 +--- .../opennlp/tools/namefind/NameFinderME.java| 8 +- .../opennlp/tools/parser/chunking/Parser.java | 4 +- .../opennlp/tools/parser/treeinsert/Parser.java | 6 +- .../java/opennlp/tools/postag/POSTaggerME.java | 8 +- .../tools/sentdetect/SentenceDetectorME.java| 2 +- .../opennlp/tools/tokenize/TokenizerME.java | 2 +- .../java/opennlp/tools/ml/MockEventTrainer.java | 6 ++ .../opennlp/tools/ml/MockSequenceTrainer.java | 6 ++ .../opennlp/tools/ml/TrainerFactoryTest.java| 12 +-- .../tools/ml/maxent/GISIndexingTest.java| 4 +- .../tools/ml/maxent/MaxentPrepAttachTest.java | 5 +- .../ml/maxent/quasinewton/QNPrepAttachTest.java | 11 ++- .../ml/naivebayes/NaiveBayesPrepAttachTest.java | 5 +- .../ml/perceptron/PerceptronPrepAttachTest.java | 11 ++- .../java/opennlp/uima/util/OpennlpUtil.java | 4 +- 27 files changed, 114 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/opennlp/blob/51cd8091/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java -- diff --git a/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java b/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java index a59b5ce..71917fb 100644 --- a/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java +++ b/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java @@ -171,7 +171,7 @@ public class ChunkerME implements Chunker { Map manifestInfoEntries = new HashMap<>(); -TrainerType trainerType = TrainerFactory.getTrainerType(mlParams.getSettings()); +TrainerType trainerType = TrainerFactory.getTrainerType(mlParams); MaxentModel chunkerModel = null; @@ -179,13 +179,13 @@ public class ChunkerME implements Chunker { if (TrainerType.EVENT_MODEL_TRAINER.equals(trainerType)) { ObjectStream es = new ChunkerEventStream(in, factory.getContextGenerator()); - EventTrainer trainer = TrainerFactory.getEventTrainer(mlParams.getSettings(), + EventTrainer trainer = TrainerFactory.getEventTrainer(mlParams, manifestInfoEntries); chunkerModel = trainer.train(es); } else if (TrainerType.SEQUENCE_TRAINER.equals(trainerType)) { SequenceTrainer trainer = TrainerFactory.getSequenceModelTrainer( - mlParams.getSettings(), manifestInfoEntries); + mlParams, manifestInfoEntries); // TODO: This will probably cause issue, since the feature generator uses the outcomes array http://git-wip-us.apache.org/repos/asf/opennlp/blob/51cd8091/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java -- diff --git a/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java b/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java index 6855898..7ea2a0b 100644 --- a/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java +++ b/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java @@ -324,11 +324,11 @@ public final class CmdLineUtil { throw new TerminateToolException(-1, "Error during parameters loading: " + e.getMessage(), e); } - if (!TrainerFactory.isValid(params.getSettings())) { + if (!TrainerFactory.isValid(params)) { throw new TerminateToolException(1, "Training parameters file '" + paramFile + "' is invalid!"); } - TrainerFactory.TrainerType trainerType =
opennlp git commit: OpenNLP-977: Remove deprecated map methods
Repository: opennlp Updated Branches: refs/heads/master 740b6e341 -> a21b4f5c0 OpenNLP-977: Remove deprecated map methods Project: http://git-wip-us.apache.org/repos/asf/opennlp/repo Commit: http://git-wip-us.apache.org/repos/asf/opennlp/commit/a21b4f5c Tree: http://git-wip-us.apache.org/repos/asf/opennlp/tree/a21b4f5c Diff: http://git-wip-us.apache.org/repos/asf/opennlp/diff/a21b4f5c Branch: refs/heads/master Commit: a21b4f5c08e34a2887eccff57047b3e0acbc0ec5 Parents: 740b6e3 Author: Daniel RussAuthored: Mon Feb 6 13:39:59 2017 -0500 Committer: Daniel Russ Committed: Tue Feb 7 12:21:19 2017 -0500 -- .../java/opennlp/tools/chunker/ChunkerME.java | 6 +- .../java/opennlp/tools/cmdline/CmdLineUtil.java | 4 +- .../tools/cmdline/parser/ParserTrainerTool.java | 10 +-- .../cmdline/postag/POSTaggerTrainerTool.java| 2 +- .../sentdetect/SentenceDetectorTrainerTool.java | 2 +- .../cmdline/tokenizer/TokenizerTrainerTool.java | 4 +- .../tools/doccat/DocumentCategorizerME.java | 2 +- .../opennlp/tools/lemmatizer/LemmatizerME.java | 8 +- .../tools/ml/EventModelSequenceTrainer.java | 3 + .../java/opennlp/tools/ml/EventTrainer.java | 3 + .../java/opennlp/tools/ml/SequenceTrainer.java | 3 + .../java/opennlp/tools/ml/TrainerFactory.java | 83 +--- .../opennlp/tools/namefind/NameFinderME.java| 8 +- .../opennlp/tools/parser/chunking/Parser.java | 4 +- .../opennlp/tools/parser/treeinsert/Parser.java | 6 +- .../java/opennlp/tools/postag/POSTaggerME.java | 8 +- .../tools/sentdetect/SentenceDetectorME.java| 2 +- .../opennlp/tools/tokenize/TokenizerME.java | 2 +- .../java/opennlp/tools/ml/MockEventTrainer.java | 6 ++ .../opennlp/tools/ml/MockSequenceTrainer.java | 6 ++ .../opennlp/tools/ml/TrainerFactoryTest.java| 12 +-- .../tools/ml/maxent/GISIndexingTest.java| 4 +- .../tools/ml/maxent/MaxentPrepAttachTest.java | 5 +- .../ml/maxent/quasinewton/QNPrepAttachTest.java | 11 ++- .../ml/naivebayes/NaiveBayesPrepAttachTest.java | 5 +- .../ml/perceptron/PerceptronPrepAttachTest.java | 11 ++- .../java/opennlp/uima/util/OpennlpUtil.java | 4 +- 27 files changed, 114 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/opennlp/blob/a21b4f5c/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java -- diff --git a/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java b/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java index a59b5ce..71917fb 100644 --- a/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java +++ b/opennlp-tools/src/main/java/opennlp/tools/chunker/ChunkerME.java @@ -171,7 +171,7 @@ public class ChunkerME implements Chunker { Map manifestInfoEntries = new HashMap<>(); -TrainerType trainerType = TrainerFactory.getTrainerType(mlParams.getSettings()); +TrainerType trainerType = TrainerFactory.getTrainerType(mlParams); MaxentModel chunkerModel = null; @@ -179,13 +179,13 @@ public class ChunkerME implements Chunker { if (TrainerType.EVENT_MODEL_TRAINER.equals(trainerType)) { ObjectStream es = new ChunkerEventStream(in, factory.getContextGenerator()); - EventTrainer trainer = TrainerFactory.getEventTrainer(mlParams.getSettings(), + EventTrainer trainer = TrainerFactory.getEventTrainer(mlParams, manifestInfoEntries); chunkerModel = trainer.train(es); } else if (TrainerType.SEQUENCE_TRAINER.equals(trainerType)) { SequenceTrainer trainer = TrainerFactory.getSequenceModelTrainer( - mlParams.getSettings(), manifestInfoEntries); + mlParams, manifestInfoEntries); // TODO: This will probably cause issue, since the feature generator uses the outcomes array http://git-wip-us.apache.org/repos/asf/opennlp/blob/a21b4f5c/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java -- diff --git a/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java b/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java index 6855898..7ea2a0b 100644 --- a/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java +++ b/opennlp-tools/src/main/java/opennlp/tools/cmdline/CmdLineUtil.java @@ -324,11 +324,11 @@ public final class CmdLineUtil { throw new TerminateToolException(-1, "Error during parameters loading: " + e.getMessage(), e); } - if (!TrainerFactory.isValid(params.getSettings())) { + if (!TrainerFactory.isValid(params)) { throw new TerminateToolException(1, "Training parameters file '" + paramFile + "' is invalid!"); } -