Package opennlp.tools.formats.brat

# Class BratNameSampleStream

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

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BratNameSampleStream(opennlp.tools.sentdetect.SentenceDetector sentDetector, opennlp.tools.tokenize.Tokenizer tokenizer, opennlp.tools.util.ObjectStream<BratDocument> samples)`
  Initializes a new `BratNameSampleStream` with the specified parameters based on a straem of `documents`.
  `BratNameSampleStream(opennlp.tools.sentdetect.SentenceDetector sentDetector, opennlp.tools.tokenize.Tokenizer tokenizer, opennlp.tools.util.ObjectStream<BratDocument> samples, Set<String> nameTypes)`
  Creates a new `BratNameSampleStream`.
  `BratNameSampleStream(opennlp.tools.sentdetect.SentenceModel sentModel, opennlp.tools.tokenize.TokenizerModel tokenModel, opennlp.tools.util.ObjectStream<BratDocument> samples)`
  Initializes a new `BratNameSampleStream` with the specified (model) parameters.
  `BratNameSampleStream(opennlp.tools.sentdetect.SentenceModel sentModel, opennlp.tools.tokenize.TokenizerModel tokenModel, opennlp.tools.util.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(opennlp.tools.sentdetect.SentenceDetector sentDetector, opennlp.tools.tokenize.Tokenizer tokenizer, opennlp.tools.util.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(opennlp.tools.sentdetect.SentenceModel sentModel, opennlp.tools.tokenize.TokenizerModel tokenModel, opennlp.tools.util.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(opennlp.tools.sentdetect.SentenceDetector sentDetector, opennlp.tools.tokenize.Tokenizer tokenizer, opennlp.tools.util.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(opennlp.tools.sentdetect.SentenceModel sentModel, opennlp.tools.tokenize.TokenizerModel tokenModel, opennlp.tools.util.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