ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1481133 - in /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal: ae/TemporalEntityAnnotator_ImplBase.java data/analysis/TimexTreeAlignmentStatistics.java eval/Evaluation_ImplBase.java
Date Fri, 10 May 2013 18:26:48 GMT
Author: tmill
Date: Fri May 10 18:26:48 2013
New Revision: 1481133

URL: http://svn.apache.org/r1481133
Log:
Fixed a few more warnings.

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalEntityAnnotator_ImplBase.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/TimexTreeAlignmentStatistics.java
    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/ae/TemporalEntityAnnotator_ImplBase.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalEntityAnnotator_ImplBase.java?rev=1481133&r1=1481132&r2=1481133&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalEntityAnnotator_ImplBase.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/TemporalEntityAnnotator_ImplBase.java
Fri May 10 18:26:48 2013
@@ -30,7 +30,7 @@ import com.google.common.collect.Sets;
 
 public abstract class TemporalEntityAnnotator_ImplBase extends CleartkAnnotator<String>
{
 
-  private static final Set<String> SEGMENTS_TO_SKIP = Sets.newHashSet("20104", "20105",
"20116", "20138");
+  public static final Set<String> SEGMENTS_TO_SKIP = Sets.newHashSet("20104", "20105",
"20116", "20138");
 
   @Override
   public void process(JCas jCas) throws AnalysisEngineProcessException {

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/TimexTreeAlignmentStatistics.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/TimexTreeAlignmentStatistics.java?rev=1481133&r1=1481132&r2=1481133&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/TimexTreeAlignmentStatistics.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/data/analysis/TimexTreeAlignmentStatistics.java
Fri May 10 18:26:48 2013
@@ -9,13 +9,13 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.ctakes.constituency.parser.util.TreeUtils;
+import org.apache.ctakes.temporal.ae.TemporalEntityAnnotator_ImplBase;
 import org.apache.ctakes.temporal.eval.CommandLine;
 import org.apache.ctakes.temporal.eval.Evaluation_ImplBase.XMIReader;
 import org.apache.ctakes.temporal.eval.THYMEData;
 import org.apache.ctakes.typesystem.type.syntax.TreebankNode;
 import org.apache.ctakes.typesystem.type.textsem.TimeMention;
 import org.apache.ctakes.typesystem.type.textspan.Segment;
-import org.apache.ctakes.utils.tree.SimpleTree;
 import org.apache.uima.UIMAException;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.collection.CollectionReader;
@@ -51,8 +51,8 @@ public class TimexTreeAlignmentStatistic
     Options options = CliFactory.parseArguments(Options.class, args);
     List<Integer> patientSets = options.getPatients().getList();
     List<Integer> trainItems = THYMEData.getTrainPatientSets(patientSets);
-    List<Integer> devItems = THYMEData.getDevPatientSets(patientSets);
-    List<Integer> testItems = THYMEData.getTestPatientSets(patientSets);
+    //List<Integer> devItems = THYMEData.getDevPatientSets(patientSets);
+    //List<Integer> testItems = THYMEData.getTestPatientSets(patientSets);
 
     CollectionReader reader = UriCollectionReader.getCollectionReaderFromFiles(getFilesFor(trainItems,
options.getRawTextDirectory()));
     AggregateBuilder aggregateBuilder = new AggregateBuilder();
@@ -70,6 +70,7 @@ public class TimexTreeAlignmentStatistic
       //      String docId = jCas.
       //      System.out.println("Document: " + docId);
       for(Segment segment : JCasUtil.select(jCas, Segment.class)){
+    	  if(TemporalEntityAnnotator_ImplBase.SEGMENTS_TO_SKIP.contains(segment.getId())) continue;
         Collection<TimeMention> mentions = JCasUtil.selectCovered(jCas.getView("GoldView"),
TimeMention.class, segment);
         for(TimeMention mention : mentions){
           numMentions++;
@@ -94,8 +95,8 @@ public class TimexTreeAlignmentStatistic
               }
             }
             System.out.println("No alignment for: " + mention.getCoveredText());
-            System.out.println("Smallest covering treebank node is: " + (smallestCoveringNode
== null ? "null" : smallestCoveringNode.getCoveredText()));
-            System.out.println(smallestCoveringNode == null ? "no tree" : TreeUtils.tree2str(smallestCoveringNode));
+            System.out.println("  Smallest covering treebank node is: " + (smallestCoveringNode
== null ? "null" : smallestCoveringNode.getCoveredText()));
+            System.out.println("  " + (smallestCoveringNode == null ? "no tree" : TreeUtils.tree2str(smallestCoveringNode)));
           }
         }
       }

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=1481133&r1=1481132&r2=1481133&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 18:26:48 2013
@@ -23,7 +23,6 @@ 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;



Mime
View raw message