Package opennlp.tools.chunker

# Class ChunkerCrossValidator

java.lang.Object
opennlp.tools.chunker.ChunkerCrossValidator

public class ChunkerCrossValidator extends Object
Cross validator for `Chunker`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ChunkerCrossValidator(String languageCode, opennlp.tools.util.TrainingParameters params, ChunkerFactory factory, opennlp.tools.chunker.ChunkerEvaluationMonitor... listeners)`
  Initializes a `ChunkerCrossValidator` instance via given parameters.

- ## Method Summary

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

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ChunkerCrossValidator

    public ChunkerCrossValidator(String languageCode, opennlp.tools.util.TrainingParameters params, ChunkerFactory factory, opennlp.tools.chunker.ChunkerEvaluationMonitor... listeners)
    Initializes a `ChunkerCrossValidator` instance via given parameters.
    Parameters:
      `languageCode` - An ISO conform language code.
      `params` - The `TrainingParameters` for the context of cross validation.
      `factory` - The `ChunkerFactory` for creating related objects.
      `listeners` - the `evaluation listeners`.

- ## Method Details

  - ### evaluate

    public void evaluate(opennlp.tools.util.ObjectStream<opennlp.tools.chunker.ChunkSample> samples, int nFolds) throws IOException
    Starts the evaluation.
    Parameters:
      `samples` - The `ObjectStream` of `samples` to train and test with.
      `nFolds` - Number of folds. It must be greater than zero.
    Throws:
      `IOException` - Thrown if IO errors occurred.

  - ### getFMeasure

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