Package opennlp.tools.ml.model

# Interface SequenceStream<S>

All Superinterfaces:
  `AutoCloseable`, `ObjectStream<Sequence<S>>`

All Known Implementing Classes:
  `ChunkSampleSequenceStream`, `LemmaSampleSequenceStream`, `NameSampleSequenceStream`, `POSSampleSequenceStream`

public interface SequenceStream<S> extends ObjectStream<Sequence<S>>
Interface for streams of `sequences` used to train sequence models.

See Also:
  - `Event`
  - `ObjectStream`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Event[]`
  `updateContext(Sequence<S> 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 Details

  - ### updateContext

    Event[] updateContext(Sequence<S> 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.
      `model` - The `model` to use.
    Returns:
      The resulting `Event` array.