You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by dl...@apache.org on 2014/03/14 19:02:44 UTC

svn commit: r1577630 - /ctakes/sandbox/ctakes-wsd/src/main/java/org/apache/ctakes/wsd/pipelines/Analyze.java

Author: dligach
Date: Fri Mar 14 18:02:43 2014
New Revision: 1577630

URL: http://svn.apache.org/r1577630
Log:
printing more info (like semantic type)

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=1577630&r1=1577629&r2=1577630&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 Mar 14 18:02:43 2014
@@ -85,7 +85,6 @@ public class Analyze {
         if(mention.getBegin() > jCas.getDocumentText().length()) {
           continue;
         }
-
         String text = mention.getCoveredText().toLowerCase();
         String semanticType = mention.getClass().getSimpleName();
         System.out.format("%s|%s\n", text, semanticType);
@@ -96,7 +95,6 @@ public class Analyze {
         if(mention.getBegin() > jCas.getDocumentText().length()) {
           continue;
         }
-
         String text = mention.getCoveredText().toLowerCase();
         String semanticType = mention.getClass().getSimpleName();
         System.out.format("%s|%s\n", text, semanticType);
@@ -113,10 +111,10 @@ public class Analyze {
         if(mention.getBegin() > jCas.getDocumentText().length()) {
           continue;
         }
-
         String text = mention.getCoveredText().toLowerCase();
+        String semanticType = mention.getClass().getSimpleName();
         for(String code : getOntologyConceptCodes(mention)) {
-          System.out.format("%s|%s\n", text, code);
+          System.out.format("%s|%s|%s\n", text, semanticType, code);
         }
       }
 
@@ -124,10 +122,10 @@ public class Analyze {
         if(mention.getBegin() > jCas.getDocumentText().length()) {
           continue;
         }
-
         String text = mention.getCoveredText().toLowerCase();
+        String semanticType = mention.getClass().getSimpleName();
         for(String code : getOntologyConceptCodes(mention)) {
-          System.out.format("%s|%s\n", text, code);
+          System.out.format("%s|%s|%s\n", text, semanticType, code);
         }
       }
     }