ctakes-commits mailing list archives

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

URL: http://svn.apache.org/r1481134
Log:
Moved the segments to skip set into the THYMEData class and made it public.

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/THYMEData.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=1481134&r1=1481133&r2=1481134&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:30:22 2013
@@ -18,24 +18,20 @@
  */
 package org.apache.ctakes.temporal.ae;
 
-import java.util.Set;
-
+import org.apache.ctakes.temporal.eval.THYMEData;
 import org.apache.ctakes.typesystem.type.textspan.Segment;
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.jcas.JCas;
 import org.cleartk.classifier.CleartkAnnotator;
 import org.uimafit.util.JCasUtil;
 
-import com.google.common.collect.Sets;
-
 public abstract class TemporalEntityAnnotator_ImplBase extends CleartkAnnotator<String>
{
 
-  public static final Set<String> SEGMENTS_TO_SKIP = Sets.newHashSet("20104", "20105",
"20116", "20138");
 
   @Override
   public void process(JCas jCas) throws AnalysisEngineProcessException {
     for (Segment segment : JCasUtil.select(jCas, Segment.class)) {
-      if (!SEGMENTS_TO_SKIP.contains(segment.getId())) {
+      if (!THYMEData.SEGMENTS_TO_SKIP.contains(segment.getId())) {
         this.process(jCas, segment);
       }
     }

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=1481134&r1=1481133&r2=1481134&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:30:22 2013
@@ -9,7 +9,6 @@ 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;
@@ -70,7 +69,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;
+    	  if(THYMEData.SEGMENTS_TO_SKIP.contains(segment.getId())) continue;
         Collection<TimeMention> mentions = JCasUtil.selectCovered(jCas.getView("GoldView"),
TimeMention.class, segment);
         for(TimeMention mention : mentions){
           numMentions++;

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/THYMEData.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/THYMEData.java?rev=1481134&r1=1481133&r2=1481134&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/THYMEData.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/THYMEData.java
Fri May 10 18:30:22 2013
@@ -2,11 +2,15 @@ package org.apache.ctakes.temporal.eval;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
 
 /**
  * A class for splitting the THYME data into appropriate sets for evaluation.
  */
 public class THYMEData {
+  public static final Set<String> SEGMENTS_TO_SKIP = Sets.newHashSet("20104", "20105",
"20116", "20138");
 
   public static List<Integer> getTrainPatientSets(List<Integer> patientSets)
{
     List<Integer> items = new ArrayList<Integer>();



Mime
View raw message