Package opennlp.tools.formats.brat

# Class BratNameSampleStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<S,T>
opennlp.tools.formats.brat.SegmenterObjectStream<BratDocument,NameSample>
opennlp.tools.formats.brat.BratNameSampleStream

All Implemented Interfaces:
  `AutoCloseable`, `ObjectStream<NameSample>`

public class BratNameSampleStream extends SegmenterObjectStream<BratDocument,NameSample>
Generates Name Sample objects for a Brat Document object.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples)`
  Initializes a new `BratNameSampleStream` with the specified parameters based on a straem of `documents`.
  `BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples, Set<String> nameTypes)`
  Creates a new `BratNameSampleStream`.
  `BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples)`
  Initializes a new `BratNameSampleStream` with the specified (model) parameters.
  `BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples, Set<String> nameTypes)`
  Creates a new `BratNameSampleStream`.

- ## Method Summary

  ### Methods inherited from class opennlp.tools.formats.brat.SegmenterObjectStream

  `read`

  ### Methods inherited from class opennlp.tools.util.FilterObjectStream

  `close, reset`

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

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

- ## Constructor Details

  - ### BratNameSampleStream

    public BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples)
    Initializes a new `BratNameSampleStream` with the specified parameters based on a straem of `documents`.
    Parameters:
      `sentDetector` - A valid `SentenceDetector` instance.
      `tokenizer` - A valid `Tokenizer` instance.
      `samples` - The `BratDocument` `ObjectStream` to process.

  - ### BratNameSampleStream

    public BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples)
    Initializes a new `BratNameSampleStream` with the specified (model) parameters.
    Parameters:
      `sentModel` - A valid `sentence detection model`.
      `tokenModel` - A valid `tokenizer model`.
      `samples` - The `BratDocument` `ObjectStream` to process.

  - ### BratNameSampleStream

    public BratNameSampleStream(SentenceDetector sentDetector, Tokenizer tokenizer, ObjectStream<BratDocument> samples, Set<String> nameTypes)
    Creates a new `BratNameSampleStream`.
    Parameters:
      `sentDetector` - A valid `SentenceDetector` instance.
      `tokenizer` - A valid `Tokenizer` instance.
      `samples` - The `BratDocument` `ObjectStream` to process.
      `nameTypes` - the name types to use or `null` if all name types.

  - ### BratNameSampleStream

    public BratNameSampleStream(SentenceModel sentModel, TokenizerModel tokenModel, ObjectStream<BratDocument> samples, Set<String> nameTypes)
    Creates a new `BratNameSampleStream`.
    Parameters:
      `sentModel` - a `SentenceModel` model
      `tokenModel` - a `TokenizerModel` model
      `samples` - a `BratDocument` `ObjectStream`
      `nameTypes` - the name types to use or `null` if all name types