Class Hunspell
java.lang.Object
org.languagetool.rules.spelling.hunspell.Hunspell
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final booleanprivate static BiFunction<Path, Path, HunspellDictionary> private static Hunspell.Factoryprivate static final Map<Hunspell.LanguageAndPath, HunspellDictionary> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HunspellDictionaryforDictionaryInResources(String language) static HunspellDictionaryforDictionaryInResources(String language, String resourcePath) static HunspellDictionaryforDictionaryInResources(String language, String dicPath, String affPath) static HunspellDictionarygetDictionary(Path dictionary, Path affix) static voidDeprecated.static voidsetHunspellStreamFactory(Hunspell.Factory factory) Set a custom way to create Hunspell dictionaries, e.g., more efficient or portable than the default, possibly via Apache Lucene.private static Hunspell.FactoryviaTempFiles(BiFunction<Path, Path, HunspellDictionary> factory)
-
Field Details
-
FORCE_TEMP_FILES
static final boolean FORCE_TEMP_FILES -
map
-
hunspellDictionaryFactory
-
hunspellDictionaryStreamFactory
-
-
Constructor Details
-
Hunspell
public Hunspell()
-
-
Method Details
-
setHunspellDictionaryFactory
@Deprecated public static void setHunspellDictionaryFactory(BiFunction<Path, Path, HunspellDictionary> factory) -
viaTempFiles
-
setHunspellStreamFactory
Set a custom way to create Hunspell dictionaries, e.g., more efficient or portable than the default, possibly via Apache Lucene. The default one is to use a native wrapper over the real Hunspell binary, creating temporary files from the streams. -
getDictionary
-
forDictionaryInResources
-
forDictionaryInResources
public static HunspellDictionary forDictionaryInResources(String language, String dicPath, String affPath) -
forDictionaryInResources
-
setHunspellStreamFactory(org.languagetool.rules.spelling.hunspell.Hunspell.Factory)