module Hunspell
Defined in:
hunspell.crhunspell/dictionary.cr
Constant Summary
-
DEFAULT_LANG =
((ENV.fetch("LANG", "en_US.UTF-8")).split('.', 2)).first
-
The language to default to, if no 'LANG' env variable was set.
-
KNOWN_DIRECTORIES =
[File.join(Path.home, USER_DIR), File.join(Path.home, "Library/Spelling"), "/Library/Spelling", "/usr/local/share/myspell/dicts", "/usr/share/myspell/dicts", "/usr/share/hunspell", "/usr/local/share/myspell", "/usr/share/myspell", "/opt/local/share/hunspell", "/opt/share/hunspell"]
-
Known directories to search within for dictionaries.
-
USER_DIR =
".hunspell_default"
-
The directory name used to store user installed dictionaries.
Class Method Summary
-
.dict(name = self.lang) : Dictionary
Opens a Hunspell dictionary.
-
.dict(name = self.lang, &block : Dictionary -> )
Opens a Hunspell dictionary.
-
.directories : Array(String)
The dictionary directories to search for dictionary files.
-
.directories=(directories : Array(String))
The dictionary directories to search for dictionary files.
-
.lang : String
The default language.
-
.lang=(lang : String)
The default language.
Class Method Detail
Opens a Hunspell dictionary.
@param [Symbol, String] name The name of the dictionary to open.
@return [nil]
Opens a Hunspell dictionary.
@param [Symbol, String] name The name of the dictionary to open.
@yield [dict] The given block will be passed the Hunspell dictionary.
@yieldparam [Dictionary] dict The opened dictionary.
@return [nil]
The dictionary directories to search for dictionary files.
@return [Array<String, Pathname>] The directory paths.
@since 0.2.0
The dictionary directories to search for dictionary files.
@return [Array<String, Pathname>] The directory paths.
@since 0.2.0
The default language.
@return [String] The name of the default language.