ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevenbeth...@apache.org
Subject svn commit: r1468266 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Date Mon, 15 Apr 2013 23:08:32 GMT
Author: stevenbethard
Date: Mon Apr 15 23:08:32 2013
New Revision: 1468266

URL: http://svn.apache.org/r1468266
Log:
Makes CopyFromGold remove any existing annotations of the given type before copying over the
gold ones. This addresses the issue that cTAKES creates a MedicationEventMention for "today"
which was then being used as an EventMention in training the event identification system.

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=1468266&r1=1468265&r2=1468266&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
Mon Apr 15 23:08:32 2013
@@ -537,6 +537,11 @@ public abstract class Evaluation_ImplBas
       } catch (CASException e) {
         throw new AnalysisEngineProcessException(e);
       }
+      for (Class<? extends TOP> annotationClass : this.annotationClasses) {
+        for (TOP annotation : Lists.newArrayList(JCasUtil.select(systemView, annotationClass)))
{
+          annotation.removeFromIndexes();
+        }
+      }
       CasCopier copier = new CasCopier(goldView.getCas(), systemView.getCas());
       Feature sofaFeature = jCas.getTypeSystem().getFeatureByFullName(CAS.FEATURE_FULL_NAME_SOFA);
       for (Class<? extends TOP> annotationClass : this.annotationClasses) {



Mime
View raw message