ChunkerCrossValidator (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.chunker, class: ChunkerCrossValidator

# 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, TrainingParameters params, ChunkerFactory factory, ChunkerEvaluationMonitor... listeners)`
  Initializes a `ChunkerCrossValidator` instance via given parameters.

- ## Method Summary

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

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### ChunkerCrossValidator

    public ChunkerCrossValidator(String languageCode, TrainingParameters params, ChunkerFactory factory, 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(ObjectStream<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 FMeasure getFMeasure()