Revision: 17107
http://sourceforge.net/p/gate/code/17107
Author: valyt
Date: 2013-11-19 16:42:48 +0000 (Tue, 19 Nov 2013)
Log Message:
-----------
Also save the classification confidence as an annotation feature, as it could
be useful downstream.
Modified Paths:
--------------
gate/trunk/plugins/Text_Categorization/src/gate/ml/categorization/TextCategorizationPR.java
Modified:
gate/trunk/plugins/Text_Categorization/src/gate/ml/categorization/TextCategorizationPR.java
===================================================================
---
gate/trunk/plugins/Text_Categorization/src/gate/ml/categorization/TextCategorizationPR.java
2013-11-19 14:41:54 UTC (rev 17106)
+++
gate/trunk/plugins/Text_Categorization/src/gate/ml/categorization/TextCategorizationPR.java
2013-11-19 16:42:48 UTC (rev 17107)
@@ -413,9 +413,13 @@
// effect the classification
if(sameAnnotation) {
instAnn.getFeatures().put(outputFeatureName,
categoryLabels[label]);
+ instAnn.getFeatures().put(outputFeatureName + "-confidence",
+ new Double(probability));
} else {
FeatureMap fm = Factory.newFeatureMap();
fm.put(outputFeatureName, categoryLabels[label]);
+ fm.put(outputFeatureName + "-confidence",
+ new Double(probability));
Utils.addAnn(outputAS, instAnn, outputAnnotationType, fm);
}
}
@@ -538,7 +542,7 @@
* the class.
* @param outputFeatureName
*/
- @CreoleParameter(defaultValue = "class", comment =
+ @CreoleParameter(defaultValue = "category", comment =
"The name feature of the feature on the output annotations that " +
"stores the class. ")
@RunTime
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs