ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1720834 - /ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java
Date Fri, 18 Dec 2015 18:20:22 GMT
Author: tmill
Date: Fri Dec 18 18:20:22 2015
New Revision: 1720834

URL: http://svn.apache.org/viewvc?rev=1720834&view=rev
Log:
Fixed umls feature to ignore temporal (non-umls) events.

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

Modified: ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java?rev=1720834&r1=1720833&r2=1720834&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java
(original)
+++ ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/ae/features/cluster/MentionClusterUMLSFeatureExtractor.java
Fri Dec 18 18:20:22 2015
@@ -51,7 +51,7 @@ public class MentionClusterUMLSFeatureEx
       // get the entities covering this markable:
       List<IdentifiedAnnotation> mentionEnts = new ArrayList<>(coveringMap.get(head));
//JCasUtil.selectCovering(jCas, IdentifiedAnnotation.class, head1.getBegin(), head1.getEnd());'
       for(IdentifiedAnnotation ann : mentionEnts){
-        if(!(ann instanceof EntityMention || ann instanceof EventMention)){
+        if(!(ann instanceof EntityMention || ann instanceof EventMention) || ann.getClass()
== EventMention.class){
           rmList.add(ann);
         }
       }
@@ -164,7 +164,7 @@ public class MentionClusterUMLSFeatureEx
     // get the entities covering this markable:
     List<IdentifiedAnnotation> mentionEnts = new ArrayList<>(coveringMap.get(head));
//JCasUtil.selectCovering(jCas, IdentifiedAnnotation.class, head1.getBegin(), head1.getEnd());'
     for(IdentifiedAnnotation ann : mentionEnts){
-      if(!(ann instanceof EntityMention || ann instanceof EventMention)){
+      if(!(ann instanceof EntityMention || ann instanceof EventMention) || ann.getClass()
== EventMention.class){
         rmList.add(ann);
       }
     }



Mime
View raw message