java.lang.Object
org.languagetool.rules.spelling.symspell.implementation.SymSpell
All Implemented Interfaces:
Serializable

public class SymSpell extends Object implements Serializable
See Also:
  • Constructor Details

    • SymSpell

      public SymSpell(int initialCapacity, int maxDictionaryEditDistance, int prefixLength, int countThreshold)
  • Method Details

    • createDictionaryEntry

      public boolean createDictionaryEntry(String key, long count, SuggestionStage staging)
    • loadDictionary

      public boolean loadDictionary(String corpus, int termIndex, int countIndex)
    • loadDictionary

      public boolean loadDictionary(InputStream corpus, int termIndex, int countIndex)
    • loadDictionary

      public boolean loadDictionary(BufferedReader br, int termIndex, int countIndex)
    • createDictionary

      public boolean createDictionary(String corpus)
    • purgeBelowThresholdWords

      public void purgeBelowThresholdWords()
    • commitStaged

      public void commitStaged(SuggestionStage staging)
    • lookup

      public List<SuggestItem> lookup(String input, SymSpell.Verbosity verbosity)
    • lookup

      public List<SuggestItem> lookup(String input, SymSpell.Verbosity verbosity, int maxEditDistance)
    • lookupCompound

      public List<SuggestItem> lookupCompound(String input, int maxEditDistance)
    • lookupCompound

      public List<SuggestItem> lookupCompound(String input)
    • wordSegmentation

      public org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion wordSegmentation(String input)
    • wordSegmentation

      public org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion wordSegmentation(String input, int maxEditDistance)
    • wordSegmentation

      public org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion wordSegmentation(String input, int maxEditDistance, int maxSegmentationWordLength)