Package org.omegat.core.spellchecker
Class SpellCheckerManager
java.lang.Object
org.omegat.core.spellchecker.SpellCheckerManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a spell checker engine used currently.static Filestatic org.apache.lucene.analysis.hunspell.DictionarygetHunspellDictionary(String language) Provide the Hunspell dictionary object.static morfologik.stemming.DictionarygetMorfologikDictionary(String language) Provide the Mofologik dictionary object.static PathinstallHunspellDictionary(String dictionaryDir, String language) Install hunspell dictionary into the specified directory.static voidregisterSpellCheckerDictionaryProvider(String lang, SpellCheckDictionaryType type, String dictionaryProvider) The entry point to register spell checker dictionary class.
-
Constructor Details
-
SpellCheckerManager
public SpellCheckerManager()
-
-
Method Details
-
getDefaultDictionaryDir
-
getCurrentSpellChecker
Get a spell checker engine used currently.- Returns:
- spell checker engine.
-
getMorfologikDictionaryLanguages
-
getHunspellDictionaryLanguages
-
registerSpellCheckerDictionaryProvider
public static void registerSpellCheckerDictionaryProvider(String lang, SpellCheckDictionaryType type, String dictionaryProvider) The entry point to register spell checker dictionary class.- Parameters:
lang- supported language e.g., en, en_UStype- enum type of dictionary.dictionaryProvider- full qualified class path of the dictionary provider.
-
installHunspellDictionary
Install hunspell dictionary into the specified directory.- Parameters:
dictionaryDir- target directory.language- target dictionary language.- Returns:
- Path of the dictionary installed.
-
getHunspellDictionary
Provide the Hunspell dictionary object.- Parameters:
language- target language e.g, en, en_US- Returns:
- Lucene hunspell Dictionary object.
-
getMorfologikDictionary
Provide the Mofologik dictionary object.- Parameters:
language- target language, e.g., en, en_US- Returns:
- Morfologik Dictionary object.
-