Class SpellCheckerManager

java.lang.Object
org.omegat.core.spellchecker.SpellCheckerManager

public class SpellCheckerManager extends Object
  • Constructor Details

    • SpellCheckerManager

      public SpellCheckerManager()
  • Method Details

    • getDefaultDictionaryDir

      public static File getDefaultDictionaryDir()
    • getCurrentSpellChecker

      public ISpellChecker getCurrentSpellChecker()
      Get a spell checker engine used currently.
      Returns:
      spell checker engine.
    • getMorfologikDictionaryLanguages

      public static Set<String> getMorfologikDictionaryLanguages()
    • getHunspellDictionaryLanguages

      public static Set<String> 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_US
      type - enum type of dictionary.
      dictionaryProvider - full qualified class path of the dictionary provider.
    • installHunspellDictionary

      public static Path installHunspellDictionary(String dictionaryDir, String language)
      Install hunspell dictionary into the specified directory.
      Parameters:
      dictionaryDir - target directory.
      language - target dictionary language.
      Returns:
      Path of the dictionary installed.
    • getHunspellDictionary

      public static org.apache.lucene.analysis.hunspell.Dictionary getHunspellDictionary(String language)
      Provide the Hunspell dictionary object.
      Parameters:
      language - target language e.g, en, en_US
      Returns:
      Lucene hunspell Dictionary object.
    • getMorfologikDictionary

      public static morfologik.stemming.Dictionary getMorfologikDictionary(String language)
      Provide the Mofologik dictionary object.
      Parameters:
      language - target language, e.g., en, en_US
      Returns:
      Morfologik Dictionary object.