You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by st...@apache.org on 2013/04/16 01:08:32 UTC
svn commit: r1468266 -
/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
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) {