ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject svn commit: r1606117 - /ctakes/trunk/ctakes-examples/src/main/java/org/apache/ctakes/examples/ae/ExampleHelloWorldAnnotator.java
Date Fri, 27 Jun 2014 15:12:10 GMT
Author: chenpei
Date: Fri Jun 27 15:12:09 2014
New Revision: 1606117

URL: http://svn.apache.org/r1606117
Log:
CTAKES-223 - ctakes-examples
Thanks James- use token instead of toke 

Modified:
    ctakes/trunk/ctakes-examples/src/main/java/org/apache/ctakes/examples/ae/ExampleHelloWorldAnnotator.java

Modified: ctakes/trunk/ctakes-examples/src/main/java/org/apache/ctakes/examples/ae/ExampleHelloWorldAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-examples/src/main/java/org/apache/ctakes/examples/ae/ExampleHelloWorldAnnotator.java?rev=1606117&r1=1606116&r2=1606117&view=diff
==============================================================================
--- ctakes/trunk/ctakes-examples/src/main/java/org/apache/ctakes/examples/ae/ExampleHelloWorldAnnotator.java
(original)
+++ ctakes/trunk/ctakes-examples/src/main/java/org/apache/ctakes/examples/ae/ExampleHelloWorldAnnotator.java
Fri Jun 27 15:12:09 2014
@@ -50,17 +50,17 @@ public class ExampleHelloWorldAnnotator 
 		// Create a dummy IdentifiedAnnotation in the type system
 		// If the BaseToken Part Of Speech is a Noun
 		Collection<BaseToken> tokens = JCasUtil.select(jcas, BaseToken.class);
-		for (BaseToken toke : tokens) {
-			if (saveAnnotation && toke.getPartOfSpeech() != null
-					&& toke.getPartOfSpeech().startsWith("N")) {
+		for (BaseToken token : tokens) {
+			if (saveAnnotation && token.getPartOfSpeech() != null
+					&& token.getPartOfSpeech().startsWith("N")) {
 				IdentifiedAnnotation ann = new IdentifiedAnnotation(jcas);
-				ann.setBegin(toke.getBegin());
-				ann.setEnd(toke.getEnd());
+				ann.setBegin(token.getBegin());
+				ann.setEnd(token.getEnd());
 				ann.addToIndexes();
 
 				if (printAnnotation) {
-					LOG.info("Token:" + toke.getCoveredText() + " POS:"
-							+ toke.getPartOfSpeech());
+					LOG.info("Token:" + token.getCoveredText() + " POS:"
+							+ token.getPartOfSpeech());
 				}
 			}
 		}



Mime
View raw message