Conll03NameSampleStream (Apache OpenNLP :: Core :: Formats 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.formats, class: Conll03NameSampleStream

Package opennlp.tools.formats

# Class Conll03NameSampleStream

java.lang.Object
opennlp.tools.formats.Conll03NameSampleStream

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

public class Conll03NameSampleStream extends Object implements opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>
An import stream which can parse the CONLL03 data.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `Conll03NameSampleStream.LANGUAGE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, opennlp.tools.util.InputStreamFactory in, int types)`
  Initializes a `Conll03NameSampleStream`.
  `Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, opennlp.tools.util.ObjectStream<String> lineStream, int types)`
  Initializes a `Conll03NameSampleStream`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `opennlp.tools.namefind.NameSample`
  `read()`
  `void`
  `reset()`

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

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

- ## Constructor Details

  - ### Conll03NameSampleStream

    public Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, opennlp.tools.util.ObjectStream<String> lineStream, int types)
    Initializes a `Conll03NameSampleStream`.
    Parameters:
      `lang` - The language of the CONLL 03 data.
      `lineStream` - An `opennlp.tools.util.ObjectStream<String>` over the lines in the CONLL 03 data file.
      `types` - The entity types to include in the Name Sample object stream.

  - ### Conll03NameSampleStream

    public Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, opennlp.tools.util.InputStreamFactory in, int types) throws IOException
    Initializes a `Conll03NameSampleStream`.
    Parameters:
      `lang` - The language of the CONLL 03 data.
      `in` - The `InputStreamFactory` for the input file.
      `types` - The entity types to include in the Name Sample object stream.
    Throws:
      `IOException` - Thrown if IO errors occurred.

- ## Method Details

  - ### read

    public opennlp.tools.namefind.NameSample read() throws IOException
    Specified by:
      `read` in interface `opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>`
    Throws:
      `IOException`

  - ### reset

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