Live data from Hacker News

A spellchecker used to be a major feat of software engineering (2008)

prog21.dadgum.com

21–30 of 210 posts

Re: A spellchecker used to be a major feat of software engineering (2008)

#21

I'd have liked more explanation of the actual solutions that programmers used at the time.

For checking? Just a lookup on disk (no db, just a large list with a custom index, then binary search in the retrieved block). Decoding anything was slow, and in-core was basically out of the question [1]. Caching was important, though, since just a handful of words make up 50% of the text.

I once built a spell checker plus corrector which had to run in 32kB under a DOS hotkey, interacting with some word processor. On top of that, it had to run from CD ROM, and respond within a second. I could do 4 lookups, in blocks of 8kB, which gave me the option to look up the word in normal order, in reverse order, and a phonetic transcription in both directions. Each 8kB block contained quite a few words, can't remember how many. Then counting the similarities, and returning them as a sorted list. It wasn't perfect, but worked reasonably well.

[1] Adding that for professional spell checking you'd need at least 100k lemmata plus all inflections plus information per word if you have to accept compounds/agglutination.

Re: A spellchecker used to be a major feat of software engineering (2008)

#22

Is there a reason why Apple's iPhone spellcheck is often really poor, significantly worse than both LLMs and just...human eyes? I often find myself butchering the spelling of a word in a way where the correct answer is obvious to human eyes (probably because of "typoglycemia" [1]) and an AI LLM immediately understands what I meant to say, but Apple's spellcheck has "No Guesses Found." Does anyone else have this exper…

I run into this all the time. I've just given up on the built-in spell checker and search the word in Google now.

Re: A spellchecker used to be a major feat of software engineering (2008)

#23

One wild thing about the AI era is that tasks which once required specialized NLP expertise—rhyming/meter detection, grammar correction, sentiment analysis—can now be done by weak LLMs. Same APIs, different prompts. I’m surprised more people aren’t exploiting this.

Sentiment analysis by small models is quite bad. I haven't tried grammar correction, but I imagine it will perform better in English than in e.g. German.

Re: A spellchecker used to be a major feat of software engineering (2008)

#24

Is there a reason why Apple's iPhone spellcheck is often really poor, significantly worse than both LLMs and just...human eyes? I often find myself butchering the spelling of a word in a way where the correct answer is obvious to human eyes (probably because of "typoglycemia" [1]) and an AI LLM immediately understands what I meant to say, but Apple's spellcheck has "No Guesses Found." Does anyone else have this exper…

Bit off-topic - macOS has excellent built-in dictionary. Just select the word in any app, press Ctrl+Command+D and it opens it. It even guesses most incorrect words correctly. Also translation available if it exist for current keyboard locales.

E.g.

> No entries for "typoglycemia", did you mean "hypoglycemia"?

Re: A spellchecker used to be a major feat of software engineering (2008)

#25

Is there a reason why Apple's iPhone spellcheck is often really poor, significantly worse than both LLMs and just...human eyes? I often find myself butchering the spelling of a word in a way where the correct answer is obvious to human eyes (probably because of "typoglycemia" [1]) and an AI LLM immediately understands what I meant to say, but Apple's spellcheck has "No Guesses Found." Does anyone else have this exper…

I have the same experience. Some things I’ve noticed:

- they really don’t want you saying bad words of any kind.

- they do not look at context at all

- they focus too much on the first letter of the word for suggestions

Re: A spellchecker used to be a major feat of software engineering (2008)

#26

I loved what Peter Norvig did with this. It's not just a spell checker, but a spelling corrector. https://norvig.com/spell-correct.html

"why should they know about something so far __outisde__ their specialty?"

Should have used it on his spell-correct article.

Re: A spellchecker used to be a major feat of software engineering (2008)

#27

It is 2025 and the best spell checker is a search engine. Numerous time an application will not provide the correct word. Only solution is to try the word in a search engine and try using in a sentence if that fails. In my opinion, this is where ML/AL local model, no internet required, would be the most beneficial today. Even had to use a search engine with, "thoughts and opi" because I forgot how to spell opinion be…

I've had a related idea for a while now.

Instead of how LLMs operate by taking the current text and taking the most likely next token, you take your full text and use an LLM to find the likeliness/rank of each token. I'd imagine this creates a heatmap that shows which parts are the most 'surprising'.

You wouldn't catch all misspelling, but it could be very useful information to find what flows and what doesn't - or perhaps explicitly go looking for something out of the norm to capture attention.

Re: A spellchecker used to be a major feat of software engineering (2008)

#29

Is there a reason why Apple's iPhone spellcheck is often really poor, significantly worse than both LLMs and just...human eyes? I often find myself butchering the spelling of a word in a way where the correct answer is obvious to human eyes (probably because of "typoglycemia" [1]) and an AI LLM immediately understands what I meant to say, but Apple's spellcheck has "No Guesses Found." Does anyone else have this exper…

Wouldn't typoglycemia be lack of typos in your blood? Don't you mean the opposite?

Re: A spellchecker used to be a major feat of software engineering (2008)

#30
post #11

I'd have liked more explanation of the actual solutions that programmers used at the time.

For the basic word list, possibly tries ( https://en.wikipedia.org/wiki/Trie ), DAGs ( https://en.wikipedia.org/wiki/Directed_acyclic_graph#Data_co... ), or Bloom filter ( https://en.wikipedia.org/wiki/Bloom_filter )

The limit given in the article is 360KB (on floppy). At that size, you can't use Tries, you need lossy compression. A Bloom filter can get you 1 in 359 false positives with the size of word list given https://hur.st/bloomfilter/?n=234936&p=&m=360KB&k=

The error rate goes up to 1 in 66 for 256KB (in memory only);

Post reply on HN