Package opennlp.tools.namefind

# Class NameSampleSequenceStream

java.lang.Object
opennlp.tools.namefind.NameSampleSequenceStream

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

public class NameSampleSequenceStream extends Object implements opennlp.tools.ml.model.SequenceStream<opennlp.tools.namefind.NameSample>
A `SequenceStream` implementation encapsulating `samples`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi)`
  Initializes a `NameSampleSequenceStream` with given `psi` samples.
  `NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.namefind.NameContextGenerator pcg)`
  Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
  `NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.namefind.NameContextGenerator pcg, boolean useOutcomes)`
  Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
  `NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.namefind.NameContextGenerator pcg, boolean useOutcomes, opennlp.tools.util.SequenceCodec<String> seqCodec)`
  Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
  `NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.util.featuregen.AdaptiveFeatureGenerator featureGen)`
  Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
  `NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.util.featuregen.AdaptiveFeatureGenerator featureGen, boolean useOutcomes)`
  Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `opennlp.tools.ml.model.Sequence<opennlp.tools.namefind.NameSample>`
  `read()`
  `void`
  `reset()`
  `opennlp.tools.ml.model.Event[]`
  `updateContext(opennlp.tools.ml.model.Sequence<opennlp.tools.namefind.NameSample> 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

  - ### NameSampleSequenceStream

    public NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi)
    Initializes a `NameSampleSequenceStream` with given `psi` samples.
    Parameters:
      `psi` - The data stream of `samples`.

  - ### NameSampleSequenceStream

    public NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.util.featuregen.AdaptiveFeatureGenerator featureGen)
    Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
    Parameters:
      `psi` - The data stream of `samples`.
      `featureGen` - The `feature generator` to use.

  - ### NameSampleSequenceStream

    public NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.util.featuregen.AdaptiveFeatureGenerator featureGen, boolean useOutcomes)
    Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
    Parameters:
      `psi` - The data stream of `samples`.
      `featureGen` - The `feature generator` to use.
      `useOutcomes` - Whether to use outcomes or not.

  - ### NameSampleSequenceStream

    public NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.namefind.NameContextGenerator pcg)
    Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
    Parameters:
      `psi` - The data stream of `samples`.
      `pcg` - The `context generator` to use.

  - ### NameSampleSequenceStream

    public NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.namefind.NameContextGenerator pcg, boolean useOutcomes)
    Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
    Parameters:
      `psi` - The data stream of `samples`.
      `pcg` - The `context generator` to use.
      `useOutcomes` - Whether to use outcomes or not.

  - ### NameSampleSequenceStream

    public NameSampleSequenceStream(opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> psi, opennlp.tools.namefind.NameContextGenerator pcg, boolean useOutcomes, opennlp.tools.util.SequenceCodec<String> seqCodec)
    Initializes a `NameSampleSequenceStream` with given `psi` samples and an `feature generator`.
    Parameters:
      `psi` - The data stream of `samples`.
      `pcg` - The `context generator` to use.
      `useOutcomes` - Whether to use outcomes or not.
      `seqCodec` - The `SequenceCodec` to use.

- ## Method Details

  - ### updateContext

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

  - ### read

    public opennlp.tools.ml.model.Sequence<opennlp.tools.namefind.NameSample> read() throws IOException
    Specified by:
      `read` in interface `opennlp.tools.util.ObjectStream<opennlp.tools.ml.model.Sequence<opennlp.tools.namefind.NameSample>>`
    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.namefind.NameSample>>`
    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.namefind.NameSample>>`
    Throws:
      `IOException`