ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1760559 - /ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java
Date Tue, 13 Sep 2016 15:22:10 GMT
Author: tmill
Date: Tue Sep 13 15:22:10 2016
New Revision: 1760559

URL: http://svn.apache.org/viewvc?rev=1760559&view=rev
Log:
Fix for when UmlsConcept tuis are null.

Modified:
    ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java

Modified: ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java?rev=1760559&r1=1760558&r2=1760559&view=diff
==============================================================================
--- ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java
(original)
+++ ctakes/trunk/ctakes-coreference/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java
Tue Sep 13 15:22:10 2016
@@ -103,7 +103,10 @@ public class MentionClusterUMLSFeatureEx
         if(cons1 != null){
           for(int i = 0; i < cons1.size(); i++){
             if(cons1.get(i) instanceof UmlsConcept){
-              a1Tuis.add(((UmlsConcept)cons1.get(i)).getTui());
+              UmlsConcept concept = (UmlsConcept)cons1.get(i);
+              if(concept.getTui() != null){
+                a1Tuis.add(concept.getTui());
+              }
             }
           }
         }
@@ -137,7 +140,10 @@ public class MentionClusterUMLSFeatureEx
           if(cons2 != null){
             for(int i = 0; i < cons2.size(); i++){
               if(cons2.get(i) instanceof UmlsConcept){
-                a2Tuis.add(((UmlsConcept)cons2.get(i)).getTui());
+                UmlsConcept concept = (UmlsConcept)cons2.get(i);
+                if(concept.getTui() != null){
+                  a2Tuis.add(concept.getTui());
+                }
               }
             }
           }



Mime
View raw message