checkWord checks the model to determine if the word is known, bool is true if known, false otherwise. If not known, returns suggestions for close matching words.
(word string)
| 72 | // bool is true if known, false otherwise. If not known, |
| 73 | // returns suggestions for close matching words. |
| 74 | func (sp *spellCheck) checkWord(word string) ([]string, bool) { |
| 75 | if spell.Spell == nil { |
| 76 | return nil, false |
| 77 | } |
| 78 | return spell.Spell.CheckWord(word) |
| 79 | } |
| 80 | |
| 81 | // setWord sets the word to spell and other associated info |
| 82 | func (sp *spellCheck) setWord(word string, sugs []string, srcLn, srcCh int) *spellCheck { |
no test coverage detected