MCPcopy Create free account
hub / github.com/cogentcore/core / checkWord

Method checkWord

texteditor/basespell.go:74–79  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

72// bool is true if known, false otherwise. If not known,
73// returns suggestions for close matching words.
74func (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
82func (sp *spellCheck) setWord(word string, sugs []string, srcLn, srcCh int) *spellCheck {

Callers 2

spellCheckMethod · 0.80
offerCorrectMethod · 0.80

Calls 1

CheckWordMethod · 0.80

Tested by

no test coverage detected