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

Package opennlp.tools.namefind

# Class NameSampleTypeFilter

java.lang.Object
opennlp.tools.util.FilterObjectStream<opennlp.tools.namefind.NameSample,opennlp.tools.namefind.NameSample>
opennlp.tools.namefind.NameSampleTypeFilter

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

public class NameSampleTypeFilter extends FilterObjectStream<opennlp.tools.namefind.NameSample,opennlp.tools.namefind.NameSample>
A `stream` which removes `name samples` which do not have a certain type.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NameSampleTypeFilter(String[] types, opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> samples)`
  Initializes a `NameSampleTypeFilter`.
  `NameSampleTypeFilter(Set<String> types, opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> samples)`
  Initializes a `NameSampleTypeFilter`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `opennlp.tools.namefind.NameSample`
  `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

  - ### NameSampleTypeFilter

    public NameSampleTypeFilter(String[] types, opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> samples)
    Initializes a `NameSampleTypeFilter`.
    Parameters:
      `types` - An array with types to use.
      `samples` - An `opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>` with the samples to filter.

  - ### NameSampleTypeFilter

    public NameSampleTypeFilter(Set<String> types, opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample> samples)
    Initializes a `NameSampleTypeFilter`.
    Parameters:
      `types` - A `Set` with types to use.
      `samples` - An `opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>` with the samples to filter.

- ## Method Details

  - ### read

    public opennlp.tools.namefind.NameSample read() throws IOException
    Throws:
      `IOException`