Every user has words the dictionary lacks - names, jargon, project terms. Today you add a personal ignore list so the checker accepts words you mark, and stops flagging them.
Let the checker accept explicitly ignored words as correct, so they are never flagged.
No fixed dictionary fits every document - a novel has invented names, a codebase has
identifiers, a field has jargon. Rather than force those into the main dictionary, a
spell checker keeps a personal ignore list: words the user has marked as fine.
Ignore("Zaphod") records the name, and from then on the checker treats it exactly
like a known word - no flag, no suggestions.
The implementation reuses the same normalization as the dictionary, so ignoring is
case-insensitive: mark Zaphod once and zaphod and ZAPHOD are all accepted.
Conceptually the checkable test now has three outs - a token is left alone if it is
an acronym, if the dictionary contains it, or if it has been ignored - and only what
survives all three is flagged. This is the last feature the tool needs; the capstone
puts everything together on a real passage.
func (c *Checker) Ignore(word string) {// remember normalize(word) in a personal set}// a token is skipped if the dictionary Contains it OR it is ignored