edu.northwestern.at.utils.spellcheck

## Interface SpellingDictionary

- All Known Implementing Classes:
    FileBasedSpellingDictionary, HashMapSpellingDictionary, ResourceBasedSpellingDictionary, TernaryTrieSpellingDictionary

      public interface SpellingDictionary

  SpellingDictionary -- interface for spelling checker dictionary.

  This interface defines methods for a spelling checker dicionary. The interface provides for looking up words in the dictionary and for adding a word to the dictionary.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addWord(java.lang.String word)` Add a word to the dictionary.
    `boolean` | `addWords(java.lang.String[] words)` Add multiple words to the dictionary
    `void` | `clear()` Clears the dictionary of all words.
    `java.util.Set<java.lang.String>` | `getAllWords()` Retrieves all words in dictionary.
    `int` | `getNumberOfWords()` Retrieves number of words in dictionary.
    `java.util.Set<java.lang.String>` | `getRelatedWords(java.lang.String key)` Get related words.
    `boolean` | `lookupWord(java.lang.String word)` Lookup word in dictionary.

- - ### Method Detail

    - #### lookupWord

          boolean lookupWord(java.lang.String word)

      Lookup word in dictionary.
      Parameters:
        `word` - The word to lookup.
      Returns:
        True if the word was found in the dictionary.

    - #### addWord

          boolean addWord(java.lang.String word)

      Add a word to the dictionary.
      Parameters:
        `word` - The word to add to the dictionary.
      Returns:
        True if word added successfully.

    - #### addWords

          boolean addWords(java.lang.String[] words)

      Add multiple words to the dictionary
      Parameters:
        `words` - The words to add to the dictionary.
      Returns:
        True if all words added successfully.

    - #### getRelatedWords

          java.util.Set<java.lang.String> getRelatedWords(java.lang.String key)

      Get related words.
      Parameters:
        `key` - The key for the list of related words. Typically this is a hash code like a Soundex or Metaphone value.
      Returns:
        ArrayList of words related to the specified key.

    - #### getAllWords

          java.util.Set<java.lang.String> getAllWords()

      Retrieves all words in dictionary.
      Returns:
        ArrayList of all words in dictionary.

    - #### getNumberOfWords

          int getNumberOfWords()

      Retrieves number of words in dictionary.
      Returns:
        Number of words in dictionary.

    - #### clear

          void clear()

      Clears the dictionary of all words.