Class SymSpell
- java.lang.Object
-
- org.languagetool.rules.spelling.symspell.implementation.SymSpell
-
- All Implemented Interfaces:
Serializable
public class SymSpell extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SymSpell.Verbosity
-
Constructor Summary
Constructors Constructor Description SymSpell(int initialCapacity, int maxDictionaryEditDistance, int prefixLength, int countThreshold)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
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)
-
-