You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by tm...@apache.org on 2013/06/19 20:19:47 UTC
svn commit: r1494724 -
/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/AssertionEvaluation.java
Author: tmill
Date: Wed Jun 19 18:19:46 2013
New Revision: 1494724
URL: http://svn.apache.org/r1494724
Log:
Added type id info to gold reader, fixed printing of errors for multi-class attributes.
Modified:
ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/AssertionEvaluation.java
Modified: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/AssertionEvaluation.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/AssertionEvaluation.java?rev=1494724&r1=1494723&r2=1494724&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/AssertionEvaluation.java (original)
+++ ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/AssertionEvaluation.java Wed Jun 19 18:19:46 2013
@@ -965,14 +965,16 @@ private static void printErrors(JCas jCa
if(!goldLabel.equals(systemLabel)){
if(trueCategory == null){
// used for multi-class case:
- System.out.println("Incorrectly labeled as " + systemLabel + " when the example was " + goldLabel + ": " + formatError(jCas, goldAnnotation));
+ System.out.println(classifierType+" Incorrectly labeled as " + systemLabel + " when the example was " + goldLabel + ": " + formatError(jCas, goldAnnotation));
}else if(systemLabel.equals(trueCategory)){
System.out.println(classifierType+" FP: " + formatError(jCas, systemAnnotation));
}else{
System.out.println(classifierType+" FN: " + formatError(jCas, goldAnnotation));
}
}else{
- if(systemLabel.equals(trueCategory)){
+ if(trueCategory == null){
+ // multi-class case -- probably don't want to print anything?
+ }else if(systemLabel.equals(trueCategory)){
System.out.println(classifierType+" TP: " + formatError(jCas, systemAnnotation));
}else{
System.out.println(classifierType+" TN: " + formatError(jCas, systemAnnotation));
@@ -1455,7 +1457,8 @@ private void addCleartkAttributeAnnotato
// copying non-assertion fields
newGoldEntityMention.setConfidence(oldSystemEntityMention.getConfidence());
-
+ newGoldEntityMention.setTypeID(oldSystemEntityMention.getTypeID());
+
newGoldEntityMention.addToIndexes();
}
@@ -1474,6 +1477,7 @@ private void addCleartkAttributeAnnotato
// copying non-assertion fields
newGoldEventMention.setConfidence(oldSystemEventMention.getConfidence());
+ newGoldEventMention.setTypeID(oldSystemEventMention.getTypeID());
newGoldEventMention.addToIndexes();
}