uima-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r997063 - /uima/sandbox/trunk/SnowballAnnotator/src/main/java/org/apache/uima/annotator/SnowballAnnotator.java
Date Tue, 14 Sep 2010 20:03:27 GMT
Author: schor
Date: Tue Sep 14 20:03:27 2010
New Revision: 997063

URL: http://svn.apache.org/viewvc?rev=997063&view=rev
Log:
[UIMA-1682] add a warn message if language "x-unspecified" passed to snowball annotator.

Modified:
    uima/sandbox/trunk/SnowballAnnotator/src/main/java/org/apache/uima/annotator/SnowballAnnotator.java

Modified: uima/sandbox/trunk/SnowballAnnotator/src/main/java/org/apache/uima/annotator/SnowballAnnotator.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/SnowballAnnotator/src/main/java/org/apache/uima/annotator/SnowballAnnotator.java?rev=997063&r1=997062&r2=997063&view=diff
==============================================================================
--- uima/sandbox/trunk/SnowballAnnotator/src/main/java/org/apache/uima/annotator/SnowballAnnotator.java
(original)
+++ uima/sandbox/trunk/SnowballAnnotator/src/main/java/org/apache/uima/annotator/SnowballAnnotator.java
Tue Sep 14 20:03:27 2010
@@ -62,6 +62,7 @@ public class SnowballAnnotator extends J
 
     // get get stemmer for the document language
     String language = new Language(aJCas.getDocumentLanguage()).getLanguagePart();
+
     SnowballProgram stemmer = this.stemmers.get(language);
 
     // create stemms if stemmer for the current document language is available
@@ -93,6 +94,10 @@ public class SnowballAnnotator extends J
         // get stemmer result and set annotation feature
         annot.setStem(stemmer.getCurrent());
       }
+    } else {
+      if (language.equals("x")) {
+        this.logger.log(Level.WARNING, "Language of the CAS is set to 'x', SnowballAnnotator
skipped processing.");
+      }
     }
     this.logger.log(Level.INFO, "Snowball annotator processing finished");
   }



Mime
View raw message