public class SymSpell extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
SymSpell.Verbosity |
Constructor and Description |
---|
SymSpell(int initialCapacity,
int maxDictionaryEditDistance,
int prefixLength,
int countThreshold) |
Modifier and Type | Method and Description |
---|---|
void |
commitStaged(SuggestionStage staging) |
boolean |
createDictionary(String corpus) |
boolean |
createDictionaryEntry(String key,
long count,
SuggestionStage staging) |
boolean |
loadDictionary(BufferedReader br,
int termIndex,
int countIndex) |
boolean |
loadDictionary(InputStream corpus,
int termIndex,
int countIndex) |
boolean |
loadDictionary(String corpus,
int termIndex,
int countIndex) |
List<SuggestItem> |
lookup(String input,
SymSpell.Verbosity verbosity) |
List<SuggestItem> |
lookup(String input,
SymSpell.Verbosity verbosity,
int maxEditDistance) |
List<SuggestItem> |
lookupCompound(String input) |
List<SuggestItem> |
lookupCompound(String input,
int maxEditDistance) |
void |
purgeBelowThresholdWords() |
org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion |
wordSegmentation(String input) |
org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion |
wordSegmentation(String input,
int maxEditDistance) |
org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion |
wordSegmentation(String input,
int maxEditDistance,
int maxSegmentationWordLength) |
public SymSpell(int initialCapacity, int maxDictionaryEditDistance, int prefixLength, int countThreshold)
public boolean createDictionaryEntry(String key, long count, SuggestionStage staging)
public boolean loadDictionary(String corpus, int termIndex, int countIndex)
public boolean loadDictionary(InputStream corpus, int termIndex, int countIndex)
public boolean loadDictionary(BufferedReader br, int termIndex, int countIndex)
public boolean createDictionary(String corpus)
public void purgeBelowThresholdWords()
public void commitStaged(SuggestionStage staging)
public List<SuggestItem> lookup(String input, SymSpell.Verbosity verbosity)
public List<SuggestItem> lookup(String input, SymSpell.Verbosity verbosity, int maxEditDistance)
public List<SuggestItem> lookupCompound(String input, int maxEditDistance)
public List<SuggestItem> lookupCompound(String input)
public org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion wordSegmentation(String input)
public org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion wordSegmentation(String input, int maxEditDistance)
public org.languagetool.rules.spelling.symspell.implementation.SymSpell.SegmentedSuggestion wordSegmentation(String input, int maxEditDistance, int maxSegmentationWordLength)