Package opennlp.tools.ml

# Interface EventTrainer

All Superinterfaces:
  `Trainer`

All Known Implementing Classes:
  `AbstractEventTrainer`, `GISTrainer`, `NaiveBayesTrainer`, `PerceptronTrainer`, `QNTrainer`

public interface EventTrainer extends Trainer
A specialized `Trainer` that is based on an `Event` approach.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `EVENT_VALUE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MaxentModel`
  `train(DataIndexer indexer)`
  Trains a `MaxentModel` for given `events`.
  `MaxentModel`
  `train(ObjectStream<Event> events)`
  Trains a `MaxentModel` for given `events`.

  ### Methods inherited from interface opennlp.tools.commons.Trainer

  `init, init`

- ## Field Details

  - ### EVENT_VALUE

    static final String EVENT_VALUE
    See Also:
      - Constant Field Values

- ## Method Details

  - ### train

    MaxentModel train(ObjectStream<Event> events) throws IOException
    Trains a `MaxentModel` for given `events`.
    Parameters:
      `events` - The input `events`.
    Returns:
      The trained `MaxentModel`.
    Throws:
      `IOException` - Thrown if IO errors occurred.

  - ### train

    MaxentModel train(DataIndexer indexer) throws IOException
    Trains a `MaxentModel` for given `events`.
    Parameters:
      `indexer` - The input `indexer` to use.
    Returns:
      The trained `MaxentModel`.
    Throws:
      `IOException` - Thrown if IO errors occurred.