Comment by trollbridge
3 hours ago
AI can’t really spell check without risking changing the meaning of sentences. Spell checking was a solved problem before this.
3 hours ago
AI can’t really spell check without risking changing the meaning of sentences. Spell checking was a solved problem before this.
Strong disagree. One of the core strengths of LLMs from the beginning is that they are very good at NOT changing meaning, as long as your model isn't so small that it starts to get "dumb" and as long as your input fits in the context window. (Two known limitations that aren't always exposed to the end user in poorly-written applications.)
Of course, LLMs are non-deterministic and do occasionally make mistakes, so you have to use them correctly and review their output. You shouldn't paste a doc into the web UI and tell it "fix all the mistakes and write the output to a new file." You should instead have it present each mistake and fix to the user as a diff and let the user approve or deny, either within the application or allowing the user to make their own edits. Never let it "rewrite" the whole document, that's the document-editing equivalent of giving OpenClaw root on your personal computer. Nothing good will come of it.
Classic spell checkers can't detect homophones. E.g. "there" and "their." Grammar checkers can, but at least the ones that I have used also like to change the tone of my writing to sterile corporate PC speak. LLMs used for grammar checking have not, in my experience, meddled with my tone. (Although sometimes they try to admonish me for it!)
> Grammar checkers can, but at least the ones that I have used also like to change the tone of my writing to sterile corporate PC speak.
Most grammar checker packages also include style checking, and the default options tend toward that style (because that’s the big market for them.) Most of them are also configurable, so you can disable style checking entirely while still checking grammar, or tweak which style rules are applied.
Spellchecking is absolutely not a solved problem. I immediately disable spellchecking on every avenue it tries to approach because managing a bunch of dictionaries on every browser/device/application that has its own spellchecker for some godforsaken reason to not have squigglies spammed over every piece of jargon, slang, and slightly atypical spelling is incredibly annoying. I don't know how effective LLMs are, but it's difficult to imagine they can be worse than the existing regime, which is embarrassingly bad for the decades it's been around.
An interesting idea I saw long ago in some book (I thought it was K&P's "Software Tools," or my second guess was K&R1, but neither of those panned out — a strong Mandela effect) was the clever idea of a whole-document spellchecker that works purely probabilistically, by histograms: you feed it a document, it tallies the trigraphs, and any trigraph that appears only rarely is flagged as a likely typo. This approach lets through unknown-but-realistic words like "antithematory" while flagging unrealistic words like "prisencolinensinainciusol" (because of its unlikely "ciu" and "ius" clusters) and "antthemaory" (because of "ntt" and "aor").
To make this approach work better, feed it a bunch of English text (or whatever language your document is in) before the document you really want to "spellcheck."
Essentially this isn't a spell "checker" so much as a spell "linter" — it looks for antipatterns statistically associated with bugs, and reports the patterns for further investigation.
If anyone knows where this trigraph-based "spellchecker" was first presented, I'd love to find out again.
That's uhh...a language model?
Human copy editors are less than perfect too. I hired one copy editor who I could not trust to be the last person who touched a document before it went out.
I had a friend who wrote an article for the New York Times: the article made a lot of sense before she submitted it, but it was edited for length and style and it definitely read like a New York Times piece but didn't completely make sense.
If it's a solved problem, then why does my iPhone suck at it?
Only if the problem is declared to be whatever it is that spell checkers solve. As the classic joke goes, "Me spell chucker work grate. Need grandma chicken."
>Only if the problem is declared to be whatever it is that spell checkers solve.
The problem being misspelling, hence, "spell checker". Like, this seems pretty straightforward? Grammar checking if you cannot use the language properly is a pretty different problem space, and indeed has long existed and is exposed as a separate thing. And not just in fancy word processors either, if you go to something as simple as macOS TextEdit you'll see separate check boxes for "Check spelling as you type" vs "Check grammar with spelling". If someone wants to try out using LLMs for grammar no problem, but spell checking is purely about the mechanical and, importantly, deterministic aspect of typos or outright non-words.
>As the classic joke goes, "Me spell chucker work grate. Need grandma chicken."
There is a genuine touch of irony/meta in you using that here in this context. That sentence has no misspelled words, and importantly gets across the exact humorous meaning the human who wrote it intended. The joke literally only works because a human was able to make creative use of language. If you had an LLM agent posting for you to HN and it automatically changed that to:
>As the classic joke goes, "My spellchecker works great but could use some grammar checking."
Well, where would the joke be now!? This goes to the exact concern people have with powerful non-deterministic meaning-changing tools replacing deterministic meaning-preserving ones.
I just fed this entire thread (excluding your comment pointing out the joke, and the text mentioning that it was a joke) to an LLM, and it did better than the dictionary spellchecker: corrected one real error, left my "squigglies" alone which was attacked by squigglies with the old-hat spellchecker, and specifically noted, without any prompting in that direction, that it left the joke spelling unchanged. It did not rewrite any sentences. I'm all for determinism where deterministic tools work, but the current implementations are so bad I can't blame people for turning to a non-deterministic program if it's still better on average.
2 replies →
It's not clear whether using "grate" instead of "great" is a grammar mistake or a spelling mistake. I'd argue it's a spelling mistake. The intent was not "my spell checker works a frame of metal bars," it was "my spell checker works well." It just so happens that the misspelled word matches a different word.
An example of a sentence like this with correct spelling but bad grammar would be "my spell checker works good." All of the words are what they're meant to be, but the last word is not the correct part of speech.=
But because computers are good at detecting "this doesn't match any known word" and bad at detecting "this matches a word but isn't the word you meant to use here," we've redefined "spell checking" to mean "find words that don't match any known word."
Your point about the joke is not correct. If I put my comment into ChatGPT and ask for a grammar check, it recognizes that it's a joke with deliberately bad grammar and suggests leaving it alone. If I put my comment into a grammar checker, it flags multiple errors in the joke. And "deterministic meaning-preserving ones"? Traditional spell/grammar checkers may be deterministic, but at no point have they ever been guaranteed to preserve meaning, or even been particularly good at it.
2 replies →