Package opennlp.tools.chunker

# Class ChunkSampleSequenceStream

java.lang.Object
opennlp.tools.chunker.ChunkSampleSequenceStream

All Implemented Interfaces:
  `AutoCloseable`, `opennlp.tools.ml.model.SequenceStream<opennlp.tools.chunker.ChunkSample>`, `opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Sequence<opennlp.tools.chunker.ChunkSample>>`

public class ChunkSampleSequenceStream extends Object implements opennlp.tools.ml.model.SequenceStream<opennlp.tools.chunker.ChunkSample>
A `SequenceStream` implementation encapsulating `samples`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ChunkSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.chunker.ChunkSample> samples, opennlp.tools.chunker.ChunkerContextGenerator generator)`
  Creates a `ChunkSampleSequenceStream` with given `samples` using a `ChunkerContextGenerator`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `opennlp.tools.ml.model.Sequence<opennlp.tools.chunker.ChunkSample>`
  `read()`
  `void`
  `reset()`
  `opennlp.tools.ml.model.Event[]`
  `updateContext(opennlp.tools.ml.model.Sequence<opennlp.tools.chunker.ChunkSample> sequence, opennlp.tools.ml.model.MaxentModel model)`

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

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

- ## Constructor Details

  - ### ChunkSampleSequenceStream

    public ChunkSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.chunker.ChunkSample> samples, opennlp.tools.chunker.ChunkerContextGenerator generator)
    Creates a `ChunkSampleSequenceStream` with given `samples` using a `ChunkerContextGenerator`.
    Parameters:
      `samples` - The data stream of `samples`.
      `generator` - A `ChunkerContextGenerator` which shall be used.

- ## Method Details

  - ### read

    public opennlp.tools.ml.model.Sequence<opennlp.tools.chunker.ChunkSample> read() throws IOException
    Specified by:
      `read` in interface `opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Sequence<opennlp.tools.chunker.ChunkSample>>`
    Throws:
      `IOException`

  - ### updateContext

    public opennlp.tools.ml.model.Event[] updateContext(opennlp.tools.ml.model.Sequence<opennlp.tools.chunker.ChunkSample> sequence, opennlp.tools.ml.model.MaxentModel model)
    Specified by:
      `updateContext` in interface `opennlp.tools.ml.model.SequenceStream<opennlp.tools.chunker.ChunkSample>`

  - ### reset

    public void reset() throws IOException, UnsupportedOperationException
    Specified by:
      `reset` in interface `opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Sequence<opennlp.tools.chunker.ChunkSample>>`
    Throws:
      `IOException`
      `UnsupportedOperationException`

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Sequence<opennlp.tools.chunker.ChunkSample>>`
    Throws:
      `IOException`