Package opennlp.tools.tokenize

# Class DetokenizationDictionary

java.lang.Object
opennlp.tools.tokenize.DetokenizationDictionary

public class DetokenizationDictionary extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `DetokenizationDictionary.Operation`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DetokenizationDictionary(File file)`
  Initializes a `DetokenizationDictionary` instance via a valid `File`.
  `DetokenizationDictionary(InputStream in)`
  Initializes a `DetokenizationDictionary` instance via a valid `InputStream`.
  `DetokenizationDictionary(String[] tokens, DetokenizationDictionary.Operation[] operations)`
  Initializes a `DetokenizationDictionary` instance.
  `DetokenizationDictionary(Path path)`
  Initializes a `DetokenizationDictionary` instance via a valid `Path`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `serialize(OutputStream out)`
  Serializes the current state of a `DetokenizationDictionary` via an `output stream`.

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

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

- ## Constructor Details

  - ### DetokenizationDictionary

    public DetokenizationDictionary(String[] tokens, DetokenizationDictionary.Operation[] operations)
    Initializes a `DetokenizationDictionary` instance.
    Parameters:
      `tokens` - An array of tokens that should be de-tokenized according to `operations`.
      `operations` - An array of operations which specifies which operation should be used for the provided `tokens`.

  - ### DetokenizationDictionary

    public DetokenizationDictionary(InputStream in) throws IOException
    Initializes a `DetokenizationDictionary` instance via a valid `InputStream`.
    Parameters:
      `in` - The `InputStream` used for loading the dictionary.
    Throws:
      `IOException` - Thrown if IO errors occurred during initialization.

  - ### DetokenizationDictionary

    public DetokenizationDictionary(File file) throws IOException
    Initializes a `DetokenizationDictionary` instance via a valid `File`.
    Parameters:
      `file` - The `File` used for loading the dictionary.
    Throws:
      `IOException` - Thrown if IO errors occurred during initialization.

  - ### DetokenizationDictionary

    public DetokenizationDictionary(Path path) throws IOException
    Initializes a `DetokenizationDictionary` instance via a valid `Path`.
    Parameters:
      `path` - The `Path` used for loading the dictionary.
    Throws:
      `IOException` - Thrown if IO errors occurred during initialization.

- ## Method Details

  - ### serialize

    public void serialize(OutputStream out) throws IOException
    Serializes the current state of a `DetokenizationDictionary` via an `output stream`.
    Parameters:
      `out` - A valid, open `OutputStream` ready to be used for serialization.
    Throws:
      `IOException` - Thrown if IO errors occurred during serialization.