// statistics will be based on the "category" feature of the BinaryTextRelations
AnnotationStatistics<String> stats = new AnnotationStatistics<String>();
Function<BinaryTextRelation, HashableArguments> getSpan = new Function<BinaryTextRelation, HashableArguments>() {
@Override
public HashableArguments apply(BinaryTextRelation relation) {
return new HashableArguments(relation);
}
};
Function<BinaryTextRelation, String> getOutcome = AnnotationStatistics.annotationToFeatureValue("category");
// calculate statistics, iterating over the results of the classifier