ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From james-mas...@apache.org
Subject svn commit: r1581048 - /ctakes/trunk/ctakes-template-filler/src/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerAnnotator.java
Date Mon, 24 Mar 2014 20:37:52 GMT
Author: james-masanz
Date: Mon Mar 24 20:37:52 2014
New Revision: 1581048

URL: http://svn.apache.org/r1581048
Log:
CTAKES-290 swap usage of arg1 and arg2 from location of relation so bodyLocation gets filled
in correctly

Modified:
    ctakes/trunk/ctakes-template-filler/src/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerAnnotator.java

Modified: ctakes/trunk/ctakes-template-filler/src/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-template-filler/src/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerAnnotator.java?rev=1581048&r1=1581047&r2=1581048&view=diff
==============================================================================
--- ctakes/trunk/ctakes-template-filler/src/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerAnnotator.java
(original)
+++ ctakes/trunk/ctakes-template-filler/src/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerAnnotator.java
Mon Mar 24 20:37:52 2014
@@ -247,8 +247,8 @@ public class TemplateFillerAnnotator ext
 	    		
 	    	} else if (relation.equals("location_of")) {
 
-	    		EntityMention arg2Arg = (EntityMention) arg2.getArgument(); // wrongly created as
EntityMention prior to 3.0
-	    		IdentifiedAnnotation ia = mapToMentions.get(arg2Arg);
+	    		IdentifiedAnnotation arg1Arg = (IdentifiedAnnotation) arg1.getArgument();
+	    		IdentifiedAnnotation ia = mapToMentions.get(arg1Arg);
 
 	    		if (ia instanceof EntityMention) {
 	    			
@@ -257,7 +257,7 @@ public class TemplateFillerAnnotator ext
 	    			// and "left renal vein" in relation location_of to anatomical site mention "renal
vein"
 	    			// and "vein" in relation location_of to anatomical site mention "renal vein"
 	    			EntityMention entityMention = (EntityMention) ia;
-	    			IdentifiedAnnotation location = (IdentifiedAnnotation) arg1.getArgument();
+	    			IdentifiedAnnotation location = (IdentifiedAnnotation) arg2.getArgument();
 	    			IdentifiedAnnotation loc = (IdentifiedAnnotation)mapToMentions.get(location);
 	    			if (loc instanceof AnatomicalSiteMention) { 
 	    				AnatomicalSiteMention asm = (AnatomicalSiteMention) loc;



Mime
View raw message