Package opennlp.tools.tokenize

# Class TokenizerCrossValidator

java.lang.Object
opennlp.tools.tokenize.TokenizerCrossValidator

public class TokenizerCrossValidator extends Object
A cross validator for `tokenizers`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TokenizerCrossValidator(opennlp.tools.util.TrainingParameters params, TokenizerFactory factory, opennlp.tools.tokenize.TokenizerEvaluationMonitor... listeners)`
  Creates a `TokenizerCrossValidator` using the given `TokenizerFactory`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `evaluate(opennlp.tools.util.ObjectStream<opennlp.tools.tokenize.TokenSample> 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

  - ### TokenizerCrossValidator

    public TokenizerCrossValidator(opennlp.tools.util.TrainingParameters params, TokenizerFactory factory, opennlp.tools.tokenize.TokenizerEvaluationMonitor... listeners)
    Creates a `TokenizerCrossValidator` using the given `TokenizerFactory`.
    Parameters:
      `params` - The `TrainingParameters` for the context of cross validation.
      `factory` - The `TokenizerFactory` to be used.
      `listeners` - The `evaluation listeners`.

- ## Method Details

  - ### evaluate

    public void evaluate(opennlp.tools.util.ObjectStream<opennlp.tools.tokenize.TokenSample> 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 during evaluation.

  - ### getFMeasure

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