spellcheck
Lists the misspelled words in text, with suggestions.
Details #
spellcheck(text) returns a list of records, one for each misspelled word: word, start and length (where it sits, counted as find counts) and suggestions (the Mac's guesses, best first). It uses the Mac's own spell checker in the language detectLanguage finds, or the Mac's language when it can't tell, so words you taught the Mac are accepted.
Parameters #
Takes 1 argument.
{{ spellcheck(text) }}
Examples #
spellcheck("This is a teh test")→
[
{
"length" : 3,
"start" : 10,
"suggestions" : [
"the",
"tea",
"ten",
"tech",
"feh",
"yeh",
"ted",
"tee",
"tel",
"tex",
"tbh",
"heh",
"keh",
"meh",
"het"
],
"word" : "teh"
}
]length(spellcheck(clipboard())) == 0→
trueGotchas #
Names and technical words may be flagged.
The result depends on the Mac's dictionaries, so two Macs can differ.