Documentation ¶
Overview ¶
Package hunspell is a library to parse the Hunspell file format.
Index ¶
Constants ¶
const ( EncodingUTF8 = "UTF-8" // Default EncodingISO8859_1 = "ISO8859-1" EncodingISO8859_2 = "ISO8859-2" EncodingISO8859_3 = "ISO8859-3" EncodingISO8859_4 = "ISO8859-4" EncodingISO8859_5 = "ISO8859-5" EncodingISO8859_6 = "ISO8859-6" EncodingISO8859_7 = "ISO8859-7" EncodingISO8859_8 = "ISO8859-8" EncodingISO8859_9 = "ISO8859-9" EncodingISO8859_10 = "ISO8859-10" EncodingISO8859_13 = "ISO8859-13" EncodingISO8859_14 = "ISO8859-14" EncodingISO8859_15 = "ISO8859-15" EncodingKOI8R = "KOI8-R" EncodingKOI8U = "KOI8-U" EncodingCP1251 = "CP1251" EncodingISCIIDevanagri = "ISCII-DEVANAGRI" )
List of valid SET values.
const ( // Default flag with single character. FlagASCII = "ascii" // `UTF-8' parameter sets UTF-8 encoded Unicode character flags, // single character. FlagUTF8 = "utf-8" // The `long' value sets the double extended ASCII character flag // type, double ASCII characters. FlagLong = "long" // Decimal flags numbered from 1 to 65000, and in flag fields are // separated by comma. FlagNum = "num" )
List of valid flag values.
const ( DefaultEncoding = EncodingUTF8 DefaultFlag = FlagASCII )
List of default values.
Variables ¶
This section is empty.
Functions ¶
func MergeDictionaries ¶
MergeDictionaries merge two or more dictionaries into single file. The outFile define the output of merged dictionaries. If the outFile already exist it will be truncated, otherwise it will be created. The inFiles contains list of input dictionary files.
On success it will return number of words merged into output file.
Types ¶
type Spell ¶
type Spell struct {
// contains filtered or unexported fields
}
Spell contains list of options, root words, expanded words, and affixes.
func (*Spell) AddDictionary ¶
AddDictionary from file "path".
func (*Spell) Analyze ¶ added in v0.14.0
Analyze return the morphological fields of the word and its parent. It will return nil if word is unknown.
type Stem ¶ added in v0.14.0
type Stem struct { Word string Morphemes Morphemes Parent *Stem IsForbidden bool // contains filtered or unexported fields }
Stem contains the word and its attributes.