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 2011/09/28 13:37:49 UTC

svn commit: r1176832 - /incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/postag/POSDictionary.java

Author: joern
Date: Wed Sep 28 11:37:49 2011
New Revision: 1176832

URL: http://svn.apache.org/viewvc?rev=1176832&view=rev
Log:
OPENNLP-288 Now tokens are lower cased when old tag dictionary format is used and case sensitive is set to false.

Modified:
    incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/postag/POSDictionary.java

Modified: incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/postag/POSDictionary.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/postag/POSDictionary.java?rev=1176832&r1=1176831&r2=1176832&view=diff
==============================================================================
--- incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/postag/POSDictionary.java (original)
+++ incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/postag/POSDictionary.java Wed Sep 28 11:37:49 2011
@@ -118,7 +118,10 @@ public class POSDictionary implements It
       for (int ti = 0, tl = parts.length - 1; ti < tl; ti++) {
         tags[ti] = parts[ti + 1];
       }
-      dictionary.put(parts[0], tags);
+      if (caseSensitive)
+        dictionary.put(parts[0], tags);
+      else
+        dictionary.put(parts[0].toLowerCase(), tags);
     }
   }