Class MorfologikSpeller
java.lang.Object
org.languagetool.rules.spelling.morfologik.MorfologikSpeller
Morfologik-based spell checker.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.google.common.cache.LoadingCache
<String, morfologik.stemming.Dictionary> private final morfologik.stemming.Dictionary
private final int
private final morfologik.speller.Speller
-
Constructor Summary
ConstructorsConstructorDescriptionMorfologikSpeller
(String fileInClassPath) Creates a speller with a maximum edit distance of one.MorfologikSpeller
(String fileInClassPath, int maxEditDistance) Creates a speller with the given maximum edit distance.MorfologikSpeller
(morfologik.stemming.Dictionary dictionary, int maxEditDistance) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determines whether the dictionary uses case conversions.int
getFrequency
(String word) getSuggestions
(String word) boolean
isMisspelled
(String word) toString()
-
Field Details
-
dictCache
private static final com.google.common.cache.LoadingCache<String,morfologik.stemming.Dictionary> dictCache -
dictionary
private final morfologik.stemming.Dictionary dictionary -
speller
private final morfologik.speller.Speller speller -
maxEditDistance
private final int maxEditDistance
-
-
Constructor Details
-
MorfologikSpeller
Creates a speller with the given maximum edit distance.- Parameters:
fileInClassPath
- path in classpath to morfologik dictionary
-
MorfologikSpeller
Creates a speller with a maximum edit distance of one.- Parameters:
fileInClassPath
- path in classpath to morfologik dictionary- Throws:
IOException
-
MorfologikSpeller
MorfologikSpeller(morfologik.stemming.Dictionary dictionary, int maxEditDistance) - Since:
- 2.9
-
-
Method Details