ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1481119 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Date Fri, 10 May 2013 17:55:35 GMT
Author: tmill
Date: Fri May 10 17:55:35 2013
New Revision: 1481119

URL: http://svn.apache.org/r1481119
Log:
Fxed timex tree aligner to be less promiscuous.

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java?rev=1481119&r1=1481118&r2=1481119&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Fri May 10 17:55:35 2013
@@ -23,6 +23,7 @@ import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.FilenameFilter;
 import java.io.IOException;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -578,7 +579,7 @@ public abstract class Evaluation_ImplBas
           if(sameSpanNode.getNodeType().equals("PP")){
             // if it is a PP it should be moved down to the NP
             int numChildren = sameSpanNode.getChildren().size();
-            if(sameSpanNode.getChildren(numChildren-1).getNodeType().equals("NP")){
+            if(numChildren == 2 && sameSpanNode.getChildren(0).getNodeType().equals("IN")
&& sameSpanNode.getChildren(1).getNodeType().equals("NP")){
               // move the time span to this node:
               TreebankNode mentionNode = sameSpanNode.getChildren(numChildren-1);
               mention.setBegin(mentionNode.getBegin());



Mime
View raw message