Class ConllOutputEvaluator

java.lang.Object
cc.mallet.fst.TransducerEvaluator
org.coordinatekit.crf.mallet.train.ConllOutputEvaluator

@NullMarked public class ConllOutputEvaluator extends cc.mallet.fst.TransducerEvaluator
An evaluator that outputs predicted and actual labels in CoNLL format.

This evaluator writes predictions to a file in a space-separated format with the following columns:

  • token - the input token
  • actual - the ground truth label
  • predicted - the predicted label
  • confidence - the confidence score for the predicted label

Sequences are separated by blank lines. The file includes a header row followed by a blank line.

Example output:

 token actual predicted confidence

 John B-PER B-PER 0.9823
 lives O O 0.9956
 in O O 0.9912
 London B-LOC B-LOC 0.9734

 The O O 0.9989
 cat O O 0.9876
 
  • Field Summary

    Fields inherited from class cc.mallet.fst.TransducerEvaluator

    instanceListDescriptions, instanceLists
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConllOutputEvaluator(cc.mallet.types.InstanceList testData, String description, ConllOutputConfiguration configuration)
    Creates a new CoNLL output evaluator with the specified configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    evaluateInstanceList(cc.mallet.fst.TransducerTrainer trainer, cc.mallet.types.InstanceList instances, String description)
     

    Methods inherited from class cc.mallet.fst.TransducerEvaluator

    evaluate, preamble, precondition

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConllOutputEvaluator

      public ConllOutputEvaluator(cc.mallet.types.InstanceList testData, String description, ConllOutputConfiguration configuration)
      Creates a new CoNLL output evaluator with the specified configuration.
      Parameters:
      testData - the test instances to evaluate on
      description - the description for this test data set
      configuration - the evaluator configuration
  • Method Details

    • evaluateInstanceList

      public void evaluateInstanceList(cc.mallet.fst.TransducerTrainer trainer, cc.mallet.types.InstanceList instances, String description)
      Specified by:
      evaluateInstanceList in class cc.mallet.fst.TransducerEvaluator