opennlp.tools.ml.model

## Interface SequenceStream

- All Superinterfaces:
    AutoCloseable, ObjectStream<Sequence>
  All Known Implementing Classes:
    ChunkSampleSequenceStream, LemmaSampleSequenceStream, NameSampleSequenceStream, POSSampleSequenceStream

      public interface SequenceStream
      extends ObjectStream<Sequence>

  Interface for streams of sequences used to train sequence models.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Event[]` | `updateContext(Sequence sequence, AbstractModel model)` Creates a new event array based on the outcomes predicted by the specified parameters for the specified sequence.

    - ### Methods inherited from interface opennlp.tools.util.ObjectStream

      `close, read, reset`

- - ### Method Detail

    - #### updateContext

          Event[] updateContext(Sequence sequence,
                                AbstractModel model)

      Creates a new event array based on the outcomes predicted by the specified parameters for the specified sequence.
      Parameters:
        `sequence` - The sequence to be evaluated.
      Returns:
        event array

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