ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1673797 - /ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/data/analysis/GoldRelationViewer.java
Date Wed, 15 Apr 2015 14:52:40 GMT
Author: dligach
Date: Wed Apr 15 14:52:40 2015
New Revision: 1673797

URL: http://svn.apache.org/r1673797
Log:
now including semantic types in printout

Modified:
    ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/data/analysis/GoldRelationViewer.java

Modified: ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/data/analysis/GoldRelationViewer.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/data/analysis/GoldRelationViewer.java?rev=1673797&r1=1673796&r2=1673797&view=diff
==============================================================================
--- ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/data/analysis/GoldRelationViewer.java
(original)
+++ ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/data/analysis/GoldRelationViewer.java
Wed Apr 15 14:52:40 2015
@@ -150,7 +150,11 @@ public class GoldRelationViewer {
                 if(printContext) {
                   text = String.format("%s(%s, %s)", relation.getCategory(), annot1.getCoveredText(),
annot2.getCoveredText());
                 } else {
-                  text = String.format("%s|%s|%s|%s", fileName, relation.getCategory(), annot1.getCoveredText(),
annot2.getCoveredText());
+                  String type1 = annot1.getClass().getSimpleName();
+                  String type2 = annot2.getClass().getSimpleName();
+                  String text1 = annot1.getCoveredText();
+                  String text2 = annot2.getCoveredText();
+                  text = String.format("%s|%s|%s|%s|%s|%s", fileName, relation.getCategory(),
text1, type1, text2, type2);
                 }                
                 formattedRelationsInSentence.add(text);
               }



Mime
View raw message