You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by ja...@apache.org on 2014/03/24 21:37:52 UTC

svn commit: r1581048 - /ctakes/trunk/ctakes-template-filler/src/main/java/org/apache/ctakes/template/filler/ae/TemplateFillerAnnotator.java

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;