Class MorfologikMultiSpeller
java.lang.Object
org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller
Morfologik speller that merges results from binary (.dict) and plain text (.txt) dictionaries.
- Since:
- 2.9
-
Constructor Summary
ConstructorsConstructorDescriptionMorfologikMultiSpeller(String binaryDictPath, BufferedReader plainTextReader, List<String> plainTextReaderPath, BufferedReader languageVariantPlainTextReader, String languageVariantPlainTextPath, List<String> userWords, int maxEditDistance) MorfologikMultiSpeller(String binaryDictPath, List<String> plainTextPaths, String languageVariantPlainTextPath, int maxEditDistance) MorfologikMultiSpeller(String binaryDictPath, List<String> plainTextPaths, String languageVariantPlainTextPath, UserConfig userConfig, int maxEditDistance) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether the dictionary uses case conversions.intgetFrequency(String word) Get the frequency of use of a word (0-27) form the dictionarygetSuggestions(String word) The suggestions from all dictionaries (without duplicates).booleanisMisspelled(String word) Accept the word if at least one of the dictionaries accepts it as not misspelled.
-
Constructor Details
-
MorfologikMultiSpeller
public MorfologikMultiSpeller(String binaryDictPath, List<String> plainTextPaths, String languageVariantPlainTextPath, int maxEditDistance) throws IOException - Throws:
IOException
-
MorfologikMultiSpeller
@Experimental public MorfologikMultiSpeller(String binaryDictPath, List<String> plainTextPaths, String languageVariantPlainTextPath, UserConfig userConfig, int maxEditDistance) throws IOException - Parameters:
binaryDictPath- path in classpath to a.dictbinary Morfologik fileplainTextPaths- paths in classpath to plain text.txtfiles (like spelling.txt)maxEditDistance- maximum edit distance for accepting suggestions- Throws:
IOException- Since:
- 4.2
-
MorfologikMultiSpeller
public MorfologikMultiSpeller(String binaryDictPath, BufferedReader plainTextReader, List<String> plainTextReaderPath, BufferedReader languageVariantPlainTextReader, String languageVariantPlainTextPath, List<String> userWords, int maxEditDistance) throws IOException - Parameters:
binaryDictPath- path in classpath to a.dictbinary Morfologik fileplainTextReader- reader with to a plain text.txtfile (like from spelling.txt)maxEditDistance- maximum edit distance for accepting suggestions- Throws:
IOException- Since:
- 3.0
-
-
Method Details
-
isMisspelled
Accept the word if at least one of the dictionaries accepts it as not misspelled. -
getFrequency
Get the frequency of use of a word (0-27) form the dictionary -
getSuggestions
The suggestions from all dictionaries (without duplicates). -
getSuggestionsFromUserDicts
- Parameters:
word- misspelled word- Returns:
- suggestions from users personal dictionary
- Since:
- 4.5
-
getSuggestionsFromDefaultDicts
- Parameters:
word- misspelled word- Returns:
- suggestions from built-in dictionaries
- Since:
- 4.5
-
convertsCase
public boolean convertsCase()Determines whether the dictionary uses case conversions.- Returns:
- True when the speller uses spell conversions.
- Since:
- 2.5
-