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 2016/12/22 16:23:08 UTC

opennlp git commit: OPENNLP-900: LemmatizerME and DictionaryLemmatizer share data format

Repository: opennlp
Updated Branches:
  refs/heads/trunk 927ee0fc7 -> 71e40d0b3


OPENNLP-900: LemmatizerME and DictionaryLemmatizer share data format

This closes #16


Project: http://git-wip-us.apache.org/repos/asf/opennlp/repo
Commit: http://git-wip-us.apache.org/repos/asf/opennlp/commit/71e40d0b
Tree: http://git-wip-us.apache.org/repos/asf/opennlp/tree/71e40d0b
Diff: http://git-wip-us.apache.org/repos/asf/opennlp/diff/71e40d0b

Branch: refs/heads/trunk
Commit: 71e40d0b30fbef976da3595fef8736a4e1245466
Parents: 927ee0f
Author: Daniel Russ <dr...@mail.nih.gov>
Authored: Thu Dec 22 10:55:04 2016 -0500
Committer: Kottmann <jo...@apache.org>
Committed: Thu Dec 22 17:22:34 2016 +0100

----------------------------------------------------------------------
 .../main/java/opennlp/tools/lemmatizer/DictionaryLemmatizer.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/opennlp/blob/71e40d0b/opennlp-tools/src/main/java/opennlp/tools/lemmatizer/DictionaryLemmatizer.java
----------------------------------------------------------------------
diff --git a/opennlp-tools/src/main/java/opennlp/tools/lemmatizer/DictionaryLemmatizer.java b/opennlp-tools/src/main/java/opennlp/tools/lemmatizer/DictionaryLemmatizer.java
index dde2d08..683b97c 100644
--- a/opennlp-tools/src/main/java/opennlp/tools/lemmatizer/DictionaryLemmatizer.java
+++ b/opennlp-tools/src/main/java/opennlp/tools/lemmatizer/DictionaryLemmatizer.java
@@ -54,7 +54,7 @@ public class DictionaryLemmatizer implements Lemmatizer {
     try {
       while ((line = breader.readLine()) != null) {
         final String[] elems = line.split("\t");
-        this.dictMap.put(Arrays.asList(elems[0], elems[2]), elems[1]);
+        this.dictMap.put(Arrays.asList(elems[0], elems[1]), elems[2]);
       }
     } catch (final IOException e) {
       e.printStackTrace();
@@ -84,7 +84,7 @@ public class DictionaryLemmatizer implements Lemmatizer {
     keys.addAll(Arrays.asList(word.toLowerCase(), postag));
     return keys;
   }
-  
+
   public String[] lemmatize(final String[] tokens, final String[] postags) {
     List<String> lemmas = new ArrayList<>();
     for (int i = 0; i < tokens.length; i++) {