ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1561125 - /ctakes/sandbox/ctakes-wsd/src/main/java/org/apache/ctakes/wsd/pipelines/Analyze.java
Date Fri, 24 Jan 2014 19:22:25 GMT
Author: dligach
Date: Fri Jan 24 19:22:24 2014
New Revision: 1561125

URL: http://svn.apache.org/r1561125
Log:
Generate concept / CUI counts

Modified:
    ctakes/sandbox/ctakes-wsd/src/main/java/org/apache/ctakes/wsd/pipelines/Analyze.java

Modified: ctakes/sandbox/ctakes-wsd/src/main/java/org/apache/ctakes/wsd/pipelines/Analyze.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-wsd/src/main/java/org/apache/ctakes/wsd/pipelines/Analyze.java?rev=1561125&r1=1561124&r2=1561125&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-wsd/src/main/java/org/apache/ctakes/wsd/pipelines/Analyze.java (original)
+++ ctakes/sandbox/ctakes-wsd/src/main/java/org/apache/ctakes/wsd/pipelines/Analyze.java Fri
Jan 24 19:22:24 2014
@@ -11,7 +11,6 @@ import org.apache.ctakes.typesystem.type
 import org.apache.ctakes.typesystem.type.refsem.UmlsConcept;
 import org.apache.ctakes.typesystem.type.textsem.EventMention;
 import org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation;
-import org.apache.ctakes.typesystem.type.textsem.MedicationMention;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.cas.CASException;
@@ -88,7 +87,7 @@ public class Analyze {
         throw new AnalysisEngineProcessException(e);                                    
                                      
       }   
       
-      for (EventMention mention : Lists.newArrayList(JCasUtil.select(jCas, MedicationMention.class)))
{
+      for (EventMention mention : Lists.newArrayList(JCasUtil.select(jCas, EventMention.class)))
{
         
         // avoid weird crashes
         if(mention.getBegin() == 2147483647) {
@@ -96,9 +95,7 @@ public class Analyze {
         }
         
         Set<String> codes = getOntologyConceptCodes(mention);
-        if(codes.size() != 1) {
-          System.out.println(mention.getCoveredText() + " - " + codes);
-        }
+        System.out.println(mention.getCoveredText().toLowerCase() + "," + codes.size());
       }
     }
     



Mime
View raw message