AbstractSequenceTrainer (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

opennlp.tools.ml

## Class AbstractSequenceTrainer

- java.lang.Object
- - opennlp.tools.ml.AbstractTrainer
  - - opennlp.tools.ml.AbstractSequenceTrainer

- All Implemented Interfaces:
    SequenceTrainer

      public abstract class AbstractSequenceTrainer
      extends AbstractTrainer
      implements SequenceTrainer

- - ### Field Summary

    - ### Fields inherited from class opennlp.tools.ml.AbstractTrainer

      `ALGORITHM_PARAM, CUTOFF_DEFAULT, CUTOFF_PARAM, ITERATIONS_DEFAULT, ITERATIONS_PARAM, TRAINER_TYPE_PARAM, VERBOSE_DEFAULT, VERBOSE_PARAM`

    - ### Fields inherited from interface opennlp.tools.ml.SequenceTrainer

      `SEQUENCE_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSequenceTrainer()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract SequenceClassificationModel<String>` | `doTrain(SequenceStream events)`
    `SequenceClassificationModel<String>` | `train(SequenceStream events)`

    - ### Methods inherited from class opennlp.tools.ml.AbstractTrainer

      `getAlgorithm, getCutoff, getIterations, init, init, isValid, validate`

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

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

    - ### Methods inherited from interface opennlp.tools.ml.SequenceTrainer

      `init, init`

- - ### Constructor Detail

    - #### AbstractSequenceTrainer

          public AbstractSequenceTrainer()

  - ### Method Detail

    - #### doTrain

          public abstract SequenceClassificationModel<String> doTrain(SequenceStream events)
                                                               throws IOException

      Throws:
        `IOException`

    - #### train

          public final SequenceClassificationModel<String> train(SequenceStream events)
                                                          throws IOException

      Specified by:
        `train` in interface `SequenceTrainer`
      Throws:
        `IOException`

Copyright © 2026 The Apache Software Foundation. All rights reserved.