ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1707380 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/ConjunctionRelationFeaturesExtractor.java
Date Wed, 07 Oct 2015 20:16:24 GMT
Author: tmill
Date: Wed Oct  7 20:16:24 2015
New Revision: 1707380

URL: http://svn.apache.org/viewvc?rev=1707380&view=rev
Log:
Add check for null pos tag (can happen with newline tokens).

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/ConjunctionRelationFeaturesExtractor.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/ConjunctionRelationFeaturesExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/ConjunctionRelationFeaturesExtractor.java?rev=1707380&r1=1707379&r2=1707380&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/ConjunctionRelationFeaturesExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/ConjunctionRelationFeaturesExtractor.java
Wed Oct  7 20:16:24 2015
@@ -48,6 +48,7 @@ RelationFeaturesExtractor<IdentifiedAnno
 		if(eventsInBetween.size() ==0 ){
 			for (BaseToken token: betweenTokens){
 				String pos = token.getPartOfSpeech();
+				if(pos == null) continue;
 				if(pos.startsWith("CC")||pos.equals(",")||pos.startsWith("IN")){
 					feats.add(new Feature(this.name, "Contain_Conjunction_inBetween"));
 					feats.add(new Feature(this.name, pos));



Mime
View raw message