POSSampleSequenceStream (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.postag, class: POSSampleSequenceStream

Package opennlp.tools.postag

# Class POSSampleSequenceStream

java.lang.Object
opennlp.tools.postag.POSSampleSequenceStream

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

public class POSSampleSequenceStream extends Object implements opennlp.tools.ml.model.SequenceStream<opennlp.tools.postag.POSSample>
A `SequenceStream` implementation encapsulating `samples`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `POSSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> psi)`
  Creates a `POSSampleSequenceStream` with given `samples` using a `DefaultPOSContextGenerator`.
  `POSSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> psi, opennlp.tools.postag.POSContextGenerator pcg)`
  Creates a `POSSampleSequenceStream` with given `samples` using a `POSContextGenerator`.

- ## Method Summary

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

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

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

- ## Constructor Details

  - ### POSSampleSequenceStream

    public POSSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> psi)
    Creates a `POSSampleSequenceStream` with given `samples` using a `DefaultPOSContextGenerator`.
    Parameters:
      `psi` - The data stream of `samples`.

  - ### POSSampleSequenceStream

    public POSSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample> psi, opennlp.tools.postag.POSContextGenerator pcg)
    Creates a `POSSampleSequenceStream` with given `samples` using a `POSContextGenerator`.
    Parameters:
      `psi` - The data stream of `samples`.
      `pcg` - A `POSContextGenerator` which shall be used.

- ## Method Details

  - ### updateContext

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

  - ### read

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

  - ### reset

    public void reset() throws IOException, UnsupportedOperationException
    Specified by:
      `reset` in interface `opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Sequence<opennlp.tools.postag.POSSample>>`
    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.postag.POSSample>>`
    Throws:
      `IOException`