ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1678013 - /ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java
Date Wed, 06 May 2015 14:47:23 GMT
Author: dligach
Date: Wed May  6 14:47:23 2015
New Revision: 1678013

URL: http://svn.apache.org/r1678013
Log:
This is a fix for CTAKES-358. Now for "indicates" and "causes/brings_about" relations, IndicatesTextRelation
and CausesBringsAboutTextRelation instances are created (before the knowtator reader created
generic BinaryTextRelation(s) for these relation types).

Modified:
    ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java

Modified: ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java?rev=1678013&r1=1678012&r2=1678013&view=diff
==============================================================================
--- ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java
(original)
+++ ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/SHARPKnowtatorXMLReader.java
Wed May  6 14:47:23 2015
@@ -32,7 +32,6 @@ import java.util.Set;
 
 import org.apache.ctakes.core.knowtator.KnowtatorAnnotation;
 import org.apache.ctakes.core.knowtator.KnowtatorXMLParser;
-import org.apache.ctakes.core.util.CtakesFileNamer;
 import org.apache.ctakes.core.util.SHARPKnowtatorXMLDefaults;
 import org.apache.ctakes.typesystem.type.constants.CONST;
 import org.apache.ctakes.typesystem.type.refsem.BodyLaterality;
@@ -58,8 +57,10 @@ import org.apache.ctakes.typesystem.type
 import org.apache.ctakes.typesystem.type.relation.AffectsTextRelation;
 import org.apache.ctakes.typesystem.type.relation.AspectualTextRelation;
 import org.apache.ctakes.typesystem.type.relation.BinaryTextRelation;
+import org.apache.ctakes.typesystem.type.relation.CausesBringsAboutTextRelation;
 import org.apache.ctakes.typesystem.type.relation.ComplicatesDisruptsTextRelation;
 import org.apache.ctakes.typesystem.type.relation.DegreeOfTextRelation;
+import org.apache.ctakes.typesystem.type.relation.IndicatesTextRelation;
 import org.apache.ctakes.typesystem.type.relation.LocationOfTextRelation;
 import org.apache.ctakes.typesystem.type.relation.ManagesTreatsTextRelation;
 import org.apache.ctakes.typesystem.type.relation.ManifestationOfTextRelation;
@@ -1291,6 +1292,12 @@ public class SHARPKnowtatorXMLReader ext
       } else if ("complicates/disrupts".equals(this.annotation.type)) {
         this.assertTypes(sourceMention, EventMention.class, targetMention, EventMention.class);
         relation = new ComplicatesDisruptsTextRelation(jCas);
+      } else if ("causes/brings_about".equals(this.annotation.type)) {
+        this.assertTypes(sourceMention, EventMention.class, targetMention, EventMention.class);
+        relation = new CausesBringsAboutTextRelation(jCas);
+      } else if ("indicates".equals(this.annotation.type)) {
+        this.assertTypes(sourceMention, EventMention.class, targetMention, EventMention.class);
+        relation = new IndicatesTextRelation(jCas);
       } else if ("degree_of".equals(this.annotation.type)) {
         this.assertTypes(sourceMention, EventMention.class, targetMention, Modifier.class);
         relation = new DegreeOfTextRelation(jCas);



Mime
View raw message