org.apache.lucene.analysis.hunspell

## Class Dictionary

- java.lang.Object
- - org.apache.lucene.analysis.hunspell.Dictionary

-     public class Dictionary
      extends Object

  In-memory structure for the dictionary (.dic) and affix (.aff) data of a hunspell dictionary.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Dictionary(Directory tempDir, String tempFileNamePrefix, InputStream affix, InputStream dictionary)` Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
    `Dictionary(Directory tempDir, String tempFileNamePrefix, InputStream affix, List<InputStream> dictionaries, boolean ignoreCase)` Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getIgnoreCase()` Returns true if this dictionary was constructed with the `ignoreCase` option
    `static void` | `setDefaultTempDir(Path tempDir)` Used by test framework

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

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

- - ### Constructor Detail

    - #### Dictionary

          public Dictionary(Directory tempDir,
                            String tempFileNamePrefix,
                            InputStream affix,
                            InputStream dictionary)
                     throws IOException,
                            ParseException

      Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files. You have to close the provided InputStreams yourself.
      Parameters:
        `tempDir` - Directory to use for offline sorting
        `tempFileNamePrefix` - prefix to use to generate temp file names
        `affix` - InputStream for reading the hunspell affix file (won't be closed).
        `dictionary` - InputStream for reading the hunspell dictionary file (won't be closed).
      Throws:
        `IOException` - Can be thrown while reading from the InputStreams
        `ParseException` - Can be thrown if the content of the files does not meet expected formats

    - #### Dictionary

          public Dictionary(Directory tempDir,
                            String tempFileNamePrefix,
                            InputStream affix,
                            List<InputStream> dictionaries,
                            boolean ignoreCase)
                     throws IOException,
                            ParseException

      Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files. You have to close the provided InputStreams yourself.
      Parameters:
        `tempDir` - Directory to use for offline sorting
        `tempFileNamePrefix` - prefix to use to generate temp file names
        `affix` - InputStream for reading the hunspell affix file (won't be closed).
        `dictionaries` - InputStream for reading the hunspell dictionary files (won't be closed).
      Throws:
        `IOException` - Can be thrown while reading from the InputStreams
        `ParseException` - Can be thrown if the content of the files does not meet expected formats

  - ### Method Detail

    - #### getIgnoreCase

          public boolean getIgnoreCase()

      Returns true if this dictionary was constructed with the `ignoreCase` option

    - #### setDefaultTempDir

          public static void setDefaultTempDir(Path tempDir)

      Used by test framework

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.