Class SDCrossValidator

java.lang.Object
opennlp.tools.sentdetect.SDCrossValidator

public class SDCrossValidator extends Object
A cross validator for sentence detectors.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SDCrossValidator(String languageCode, opennlp.tools.util.TrainingParameters params, SentenceDetectorFactory sdFactory, opennlp.tools.sentdetect.SentenceDetectorEvaluationMonitor... listeners)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    evaluate(opennlp.tools.util.ObjectStream<opennlp.tools.sentdetect.SentenceSample> samples, int nFolds)
    Starts the evaluation.
    opennlp.tools.util.eval.FMeasure
     

    Methods inherited from class Object

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

    • SDCrossValidator

      public SDCrossValidator(String languageCode, opennlp.tools.util.TrainingParameters params, SentenceDetectorFactory sdFactory, opennlp.tools.sentdetect.SentenceDetectorEvaluationMonitor... listeners)
  • Method Details

    • evaluate

      public void evaluate(opennlp.tools.util.ObjectStream<opennlp.tools.sentdetect.SentenceSample> samples, int nFolds) throws IOException
      Starts the evaluation.
      Parameters:
      samples - the data to train and test
      nFolds - number of folds
      Throws:
      IOException - Thrown if IO errors occurred during processing.
    • getFMeasure

      public opennlp.tools.util.eval.FMeasure getFMeasure()