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

2025-08-091:07190199prog21.dadgum.com

Here's the situation: it's 1984, and you're assigned to write the spellchecker for a new MS-DOS word processor. Some users, but not many, will have 640K of memory in their PCs. You need to support…

Here's the situation: it's 1984, and you're assigned to write the spellchecker for a new MS-DOS word processor. Some users, but not many, will have 640K of memory in their PCs. You need to support systems with as little as 256K. That's a quarter megabyte to contain the word processor, the document being edited, and the memory needed by the operating system. Oh, and the spellchecker.

For reference, on my MacBook, the standard dictionary in /usr/share/dict/words is 2,486,813 bytes and contains 234,936 words.

An enticing first option is a data format that's more compressed than raw text. The UNIX dictionary contains stop and stopped and stopping, so there's a lot of repetition. A clever trie implementation might do the trick...but we'll need a big decrease to go from 2+ megabytes to a hundred K or so.

In fact, even if we could represent each word in the spellchecker dictionary as a single byte, we need almost all the full 256K just for that, and of course the single byte representation isn't going to work. So not only does keeping the whole dictionary in RAM look hopeless, but so does keeping the actual dictionary on disk with only an index in RAM.

Now it gets messy. We could try taking a subset of the dictionary, one containing the most common words, and heavily compressing that so it fits in memory. Then we come up with a slower, disk-based mechanism for looking up the rest of the words. Or maybe we jump directly to a completely disk-based solution using a custom database of sorts (remembering, too, that we can't assume the user has a hard disk, so the dictionary still needs to be crunched onto a 360K floppy disk).

On top of this, we need to handle some other features, such as the user adding new words to the dictionary.

Writing a spellchecker in the mid-1980s was a hard problem. Programmers came up with some impressive data compression methods in response to the spellchecker challenge. Likewise there were some very clever data structures for quickly finding words in a compressed dictionary. This was a problem that could take months of focused effort to work out a solution to. (And, for the record, reducing the size of the dictionary from 200,000+ to 50,000 or even 20,000 words was a reasonable option, but even that doesn't leave the door open for a naive approach.)

Fast forward to today. A program to load /usr/share/dict/words into a hash table is 3-5 lines of Perl or Python, depending on how terse you mind being. Looking up a word in this hash table dictionary is a trivial expression, one built into the language. And that's it. Sure, you could come up with some ways to decrease the load time or reduce the memory footprint, but that's icing and likely won't be needed. The basic implementation is so mindlessly trivial that it could be an exercise for the reader in an early chapter of any Python tutorial.

That's progress.

permalink June 8, 2008


Page 2

I wrote the first draft of this in 2007, and I thought the title would be the name of my blog. But I realized I had a backlog of more tech-heavy topics that I wanted to get out of my system. I think I've finally done that, so I'm going back to the original entry I planned to write.

When I was a kid, I thought I'd be a cartoonist--I was always drawing--or a novelist. Something artistic. When I became obsessed with video games in the 1980s, I saw game design as being in the same vein as cartooning and writing: one person creating something entirely on their own. I learned to program 8-bit computers so I could implement games of my own design. Eventually, slowly, the programming overtook the design. I got a degree in computer science. I worked on some stuff that looks almost impossible now, like commercial games of over 100K lines of assembly language (and later I became possibly the only person to ever write a game entirely in PowerPC assembly language).

Somewhere along the lines, I realized I was looking at everything backward, from an implementation point of view, not from the perspective of a finished application, not considering the user first. And I realized that the inherent bitterness and negativity of programming arguments and technical defensiveness on the web were making me bitter and negative. I've consciously tried to rewind, to go back to when programming was a tool for implementing my visions, not its own end. I've found that Alan Cooper is right, in that a tech-first view promotes scarcity thinking (that is, making perceived memory and performance issues be the primary concerns) and dismissing good ideas because of obscure boundary cases. And now programming seems less frustrating than it once did.

I still like to implement my own ideas, especially in fun languages like Erlang and Perl. I'm glad I can program, because personal programming in the small is fertile ground and tremendously useful. For starters, this entire site is generated by 269 lines of commented Perl, including the archives and the atom feed (and those 269 lines also include some HTML templates). Why? Because it was pleasant and easy, and I don't have to fight with the formatting and configuration issues of other software. Writing concise to-the-purpose solutions is a primary reason for programming in the twenty-first century.

If blogs had phases, then this would be the second phase of mine. I'm not entirely sure what Phase 2 will consist of, but I'll figure that out. Happy 2010!

permalink January 1, 2010


Read the original article

Comments

  • By keiferski 2025-08-1215:5515 reply

    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 experience?

    1. https://www.dictionary.com/e/typoglycemia/

    • By AnotherGoodName 2025-08-1216:408 reply

      Yes but it’s much broader. Just in general the lack of Steve Jobs noticing these glaring issues and coming down hard to solve them is pretty clear.

      I remember when macbooks briefly came out with a ridiculously bright standby led that required Black electrical tape over if you wanted to sleep with it in the house. Shortly after no more status leds on any MacBook (thank you!).

      Nowadays i find non stop little annoyances with threads from others on the same issues on Apple devices. From.the.overly.prominent.full.stop when searching textually in the url bar to the crappy spell check and crappy spam filtering. As much as Jobs apparently came across as an asshole there’s a need for someone at the top to say ‘WTF is this, fix it or get fired!’.

      • By gitpusher 2025-08-1217:387 reply

        I worked at Apple and heard a lot of Steve stories. He really did personally approve everything. He would be sitting in a room, and team leads would all line up to give their quick 2-minute update. So it's the MacBook Air guy's turn. He comes in and places his prototype down in front of Steve. Steve opens the lid. Two seconds later he picks up the laptop and heaves it so hard it skipped across the table like a stone on water: "I said fxxking INSTANT ON!!" The poor guy collected his prototype and exited the room. Later the MacBook Air launched... it fxxking turned on the moment you open the lid

        • By mathiaspoint 2025-08-1218:043 reply

          Good product development really does seem to require some sort of leader who demands quality and smacks people when they don't deliver. Linux is nice because of Torvalds for example.

          • By Lio 2025-08-136:405 reply

            Completely agree.

            I was given a small electric fan. It’s great in that it’s portable and I can use it in some of the crummy hotels I have to stay in.

            Unfortunately, it has a bright blue LED on it so it’s a pain to use at night when you’re trying to sleep.

            It’s so bright that even covered with tape it still shines through the thin plastic of the fan body.

            What really gets me is why they bothered putting an operating light on it in the first place?

            It’s a fan. The fact that it’s working tells you it’s working.

            A Jobs or Torvalds type character would have pointed that out.

            I suspect though that it’s often a case of people noticing these type of design flaws but not having the authority to fix them while those with the authority don’t care.

            • By Aurornis 2025-08-1314:571 reply

              I've worked in physical product development at some companies that include names you'd recognize.

              More often than not, those annoying features are direct requests from the person up top who smacks people. They want that feature because they think it will sell, and it's no use trying to argue with them because you'll just get smacked again.

              • By Lio 2025-08-1315:41

                Yeah I think that was one of the unusual things about Jobs; he really cared about product design for its own sake and not just for profit.

                I think that is pretty unusual in large companies.

            • By netsharc 2025-08-137:422 reply

              Can't you improve this product with a screwdriver (to open it up) and wire-snipper (to cut off the LED)?

              • By Lio 2025-08-139:59

                Oh yeah, it's definitely solvable if you can be bothered with it.

                It was more just the observation that an unnecessary light had been included that degrades the performance of the product.

                I find it intriguing how that comes to be. On paper it seems like adding the light wouldn't hurt the product even if not useful but no body actually used it it seems.

              • By psyonity 2025-08-138:402 reply

                There is a chance the led is also used as a important diode in the circuit, plainly removing it can greatly reduce the lifespan of the device. (more common in cheaper products)

                Adding a appropiate diode in it's place is advised.

                • By rossant 2025-08-1321:06

                  What's the physical reason for this? (elec noob here)

                • By immibis 2025-08-145:54

                  that chance is very low

            • By seszett 2025-08-137:10

              > I suspect though that it’s often a case of people noticing these type of design flaws but not having the authority to fix them while those with the authority don’t care.

              Kinda related but also not really, my own pet peeve is the pouring spout in many products, coffee machine, water jugs, buckets... they might look effective but I find that more often than not, they are curved too much and drip all over when actually pouring.

              And I always have to wonder, after serving coffee from one of those things, did the person who design it never even try it just once? Didn't they ever use such a thing, they never ever poured water from a pot?

            • By dmd 2025-08-1314:281 reply

              People in stores look towards bright lights. Objects with bright lights on them sell better.

              • By seszett 2025-08-1320:29

                Do you have an actual study on this or is it just a belief held by some people who don't have any better idea to make others think they are useful?

            • By 486sx33 2025-08-181:29

              [dead]

          • By brabel 2025-08-135:593 reply

            I have to agree with that as a lead. Most developers claim to be done with a task without taking care of the small details that users will immediately notice. It’s a constant struggle to try to get them to care about what is actually the value of the feature they are implementing, let alone chase on their own initiative the small issues unless painfully listed in some requirements document.

            • By polishdude20 2025-08-136:362 reply

              As a dev Im always noticing these little problems in my designs but my boss just wants the thing done asap without worrying too much about it being nice to use.

              • By MortyWaves 2025-08-1314:16

                Same here to the point when I do leave it’s going to be one of the reasons given.

                One example is how this product manager type, because of company politics, isn’t really under the same department as the other software teams.

                Because of his very very narrow horse blinkers approach, he doesn’t see or even comprehend why we’d want to align with literally anything in any other team and that includes visual UI stuff.

                That’s why we have a bright neon pink “Back” button. Right in the literal center of the screen. It’s insane.

              • By DanielHB 2025-08-1311:151 reply

                It is the bottom and the top that appreciates the quality

                the middle appreciate metrics and deliverables

                • By polishdude20 2025-08-1314:14

                  Oh in my case it's a small company and my boss is "the top"

            • By ponector 2025-08-139:32

              There is a special role for that: Test Engineer. However, testing is a cost center and is underfunded in most companies.

            • By Phelinofist 2025-08-138:53

              For most things small details unfortunately do not really matter and thus are left out

          • By valiant55 2025-08-1221:191 reply

            I was just thinking about Linux/Linus the other day. How will Linux fair when Linus is no longer with us?

            • By jdsnape 2025-08-1222:021 reply

              Fare, not fair

              (I’m sorry, it doesn’t matter but I couldn’t help it in a discussion on quality)

              • By foundart 2025-08-130:201 reply

                In comments on an article about spellchecking no less

                • By eru 2025-08-134:571 reply

                  In this case, both fair and fare are words in English. Which shows that spell checking needs to know a lot about grammar and context to work in general. Basically you need an LLM. Or if not a 'large language model', perhaps at least a small language model.

                  • By jdsnape 2025-08-137:122 reply

                    I wonder how it does work, I remember MS Word having a fairly decent grammar checker when I was using it in school - which predated LLMs by many years!

                    I suspect an LLM wouldn’t be the most optimal choice

                    • By eru 2025-08-137:36

                      Depends on what you mean by 'optimal'. Ie what are you optimising over?

                      In terms of 'can I run it locally on an early 2000s machine?' LLMs are definitely the wrong choice.

                      In terms of 'what can I quickly hack together in 2025 regardless of variable cost?' LLMs might be the right choice.

                      > I wonder how it does work, I remember MS Word having a fairly decent grammar checker [...]

                      You can get pretty far with some lookup tables and some heuristics.

                    • By rossant 2025-08-1321:07

                      farely decent?

        • By chubot 2025-08-1316:07

          Latency is actually an interesting case, because it’s one of those things that, by default, nobody owns end-to-end

          If you’re booting a computer or building web search, every subsystem can contribute to latency. If you have more teams and more features, you’re likely to have more latency.

          In the early days of Google, Larry Page would push hard on this as well, in person. So Google search was fast.

          But later the company became larger and bureaucratized, so nobody was in charge of latency. So then each team contributes a bit to latency, and that’s what ends up shipping.

          Google products used to be known for being fast, but they’ve reverted to the mean

        • By pierrefermat1 2025-08-139:05

          The instant on thing actually bothered me enough to make switch from windows back to Mac( by proxy the idle battery drain on windows was also pretty terrible)

        • By csb6 2025-08-1220:056 reply

          Sounds like a petulant child. Wholly unnecessary to get his point across.

          • By ttoinou 2025-08-1220:102 reply

            Try saying the same things over and over to adults for years

            • By denkmoon 2025-08-135:57

              Alignment of incentives. I'm sure the personal humiliation of being yelled at by Jobs was a reasonably strong incentive, but I'm certain the perception that failing to deliver would have him personally sending you to the dole queue asap was even more of a strong incentive.

              Compare to most corporations where the only thing you can do to get fired is fail at office politics and failure to deliver/delivering the lowest quality crap that can be passed off is just business as usual.

            • By fusr 2025-08-1220:45

              [dead]

          • By arrowsmith 2025-08-137:07

            Yeah, with an attitude like that it's no wonder his products were such failures.

          • By robertlagrant 2025-08-139:37

            > Sounds like a petulant child. Wholly unnecessary to get his point across.

            See from the replies to this how well you got your point across.

          • By eru 2025-08-134:58

            Yes, Steve Jobs was a jerk.

            Alas, human don't come fully customisable. You get to pick from the packages on offer. And it seemed like for Apple Steve Jobs' good parts only came as part of a package that also included his bad parts.

          • By jbs789 2025-08-136:35

            To me it sounds like the symptom (emotion) of someone who deeply cares.

            These things need to be well-placed to be effective. Sounds like it was.

          • By valianteffort 2025-08-133:37

            [flagged]

        • By FirmwareBurner 2025-08-1218:471 reply

          >Two seconds later he picks up the laptop and heaves it so hard it skipped across the table like a stone on water: "I said fxxking INSTANT ON!!"

          When did the OG MacBook Air have instant on at launch in 2008?

          IIRC the M1 brough Instant on and Jobs wasn't around anymore.

          • By elzbardico 2025-08-1223:021 reply

            Most macbooks I remember since a long time ago were pretty much instant on way before apple sillicon. Maybe you had some corporate crapware installed in yours/.

            • By pierrefermat1 2025-08-139:04

              Depends on your definition of "instant".

              What we really mean is before you complete the action of fully opening the hinge to 120deg which is something like 1.5-2seconds?

              AFAIK pre M1 days it would be still a few seconds after fully opening and now it's more like < 1sec.

        • By m4rtink 2025-08-139:24

          Does not look like it was a healthy work culture.

        • By qmr 2025-08-135:12

          [flagged]

      • By IshKebab 2025-08-1216:473 reply

        I've also found a lot of this stuff is due to naysayers telling people that things can't be fixed (because really they don't want to bother). You need a strong leader to say "no it can and we will".

        • By abullinan 2025-08-1218:053 reply

          It takes a village. Also to be successful in tech it takes an asshole. No way around it. At some point all successful companies share an overly aggressive visionary. The entire company doesn’t need to be toxic, but the apex does. If you don’t like it, don’t climb the ladder.

          • By IshKebab 2025-08-1220:531 reply

            I don't think it requires being an arsehole. Just being firm. That doesn't require arseholery.

            • By elzbardico 2025-08-1223:022 reply

              People will call someone who doesn't bend to the status quo an asshole.

              • By leoc 2025-08-1310:44

                Both your statement and IshKebab's are true.

              • By eru 2025-08-134:591 reply

                No. Not necessarily.

                There's plenty of people described as 'quiet and polite, but firm' or some similar variations.

                • By qmr 2025-08-135:143 reply

                  What founders / CEOs can you name described by those qualities?

                  • By eru 2025-08-135:512 reply

                    I'm not sure you need to restrict yourself to these. You can also look at eg political leaders.

                    Lee Kuan Yew is one example that comes to mind immediately. Warren Buffett might be a good example from the world of business.

                    (Your favourite search engine or chatbot is probably more than happy to give you a steady stream of other examples.)

                    • By leoc 2025-08-1310:311 reply

                      I don't know, maybe he wouldn't raise his voice, but I can't imagine it would be fun to be a subordinate of LKY at the moment he decided you were wasting his time.

                      • By eru 2025-08-143:54

                        The original comment was:

                        > People will call someone who doesn't bend to the status quo an asshole.

                        That's very different from not suffering time wasters.

                    • By abullinan 2025-08-144:431 reply

                      Warren Buffet is a very carefully crafted “aww shucks” persona. He’s spent megabucks inventing it and keeping it safe. And I lose the argument because I cannot find the article from a decade ago that really dug into it. Either SEO has vanished it or he has it removed.

                      • By eru 2025-08-149:57

                        Many personas are carefully crafted. Including some of the jerks' personas.

                        As long as Warren Buffett keeps it up to his underlings and business partners..

                  • By leoc 2025-08-1310:35

                    Digital's Ken Olsen is probably one of the most relevant examples. Though it probably helped that Olsen was largely working with the grain at DEC, building digital playsets which engineers themselves loved, rather than constantly forcing them to adopt a non-technical consumer's perspective.

                  • By socalgal2 2025-08-136:46

                    [flagged]

          • By sixo 2025-08-1315:001 reply

            Skill issue. There are other ways to get those results, but being an asshole is the lowest-hanging, and is nearly free if the people around you don't have the self-respect to walk away.

            • By abullinan 2025-08-143:26

              I disagree. Point to a centibillion+ company that isn’t fronted by a toxic asshole.

          • By ttoinou 2025-08-1220:121 reply

            Surely there must be some counter examples. Collison brothers at Stripe ?

            • By stripe_away 2025-08-1220:30

              I guess you never worked at Stripe.

        • By ww520 2025-08-1217:411 reply

          Or the incentive aligned.

        • By paradox460 2025-08-1219:20

          Not just that, but the strong leader needs to ensure that it can be fixed.

          Yelling at a rank-and-file to unfuck some random system, then not giving them any time, resources, or tools to fix it is just being a dictatorial dickhead.

      • By zimpenfish 2025-08-1217:432 reply

        > From.the.overly.prominent.full.stop when searching textually in the url bar

        One of the most aggravating things in iOS. Trips me up almost every day (and it's been there for what? 10 years now?)

        • By AnotherGoodName 2025-08-1217:573 reply

          Wait until you realize that the icon of the period and spacebar don't at all line up to the touch area due to touch gravitation. You can tap slightly more on the spacebar side and still end up with a period. https://www.reddit.com/r/iphone/comments/1ekszul/comment/lgn...

          So if you suffer from this it's not even your fault. You're literally hitting the spacebar but some incentive at Apple in their org structure has led to the period literally having waaaay too much weighting and the lack of exec oversight at Apple in the post Jobs days is leading to us all.typing.periods.whenever.we.just.wanted.to.search.

          • By elzbardico 2025-08-1223:05

            This.is.incredibly.annoying.

            But.you.took.a.weight.from.my.shoulders. I always.thought. I was an incompetent who couldn't hit the spacebar correctly.

          • By doubled112 2025-08-1219:191 reply

            All this time (literal years) I thought I.was.losing it.

            • By kelipso 2025-08-1220:40

              Lol, the amount of time I spent backspacing to retype without the period. Probably my main annoyance in ios.

          • By chamomeal 2025-08-135:44

            Holy shit my phone has been gaslighting me this whole time???

        • By egypturnash 2025-08-1218:19

          rightnnextntonthenspuriousnninsteadnofnanspace

      • By mrweasel 2025-08-1216:571 reply

        It's hard to pinpoint exactly what it is, but yes, there seems to be an increasing number of small issue with Apple devices. They aren't major stuff simply not work, but yes, spam filter being pretty terrible, text overlapping on non flagship phones (e.g. the iPhone SE). All sorts of minor annoyances.

        • By AnotherGoodName 2025-08-1217:28

          Yep I've worked at other big tech where they had periodic "executive bug filing" where executives would flag minor things that are annoying. These minor issues would then have higher than normal priority purely by virtue of being flagged by an exec. I have a likely controversial opinion that this executive bug filing actually led to better outcomes.

          It did break prioritization in the opinion of the ground level teams and their goals but I argue it's not bad to at least periodically do this since grating against the current org structure prioritization and goals is not a bad thing to do on occasion.

          Chances are they'll find there's no team that considers themselves the owners of spell check or spam filtering and the goals the keyboard team are going for is likely some silly thing like "number of sentences with correct punctuation" leading to the current ridiculous outcomes where the period in the URL is way too prominent, especially considering we don't even type full URLS into the search bar that often these days.

          Dear Apple leads: if you're reading this do a short initiative where execs aim to file an annoyance a day. It's not hard to find such. There will be some complaints at the ground level that these executive annoyances get too much priority but part of that will be because you're questioning lower level org priorities (a healthy thing to do!), not because the issues don't matter. The end result will bring Apple a bit more in line with the quality we saw during the Jobs period since this is exactly the kind of shake up he did on occasion.

      • By socalgal2 2025-08-136:39

        Currrent MBPs have bright green/orange charging lights on both sides of the magsafe connector. They're bright enough I have to block them when I'm in a hotel and my laptop is in the same room.

      • By elzbardico 2025-08-1222:591 reply

        That light was really helpful to do the occasional late night visit to the bathroom in a home where I lived where there were no light controls at the bedside.

      • By MortyWaves 2025-08-1313:521 reply

        There has to be something going on with iOS Safari and the keyboard because my typing goes to complete shit in ways it never does in any other application.

        Here are some random examples I thought of for this comment. Notice how everything is spelled wrong as though the screen input doesn’t match the location of the buttons.

        - tomoroww eather in united.kingdom

        - lookip exhange rate

        - devopper news

        - download twotter.video

        • By longtimelistnr 2025-08-1314:09

          I notice this as well, i think it is because the autocorrect is turned off and we may just be so used to it learning our typing habits that our "raw" typing is really that bad

      • By mschuster91 2025-08-1310:07

        > I remember when macbooks briefly came out with a ridiculously bright standby led that required Black electrical tape over if you wanted to sleep with it in the house. Shortly after no more status leds on any MacBook (thank you!).

        The lack of status LEDs is actually the only thing I really REALLY hate about MacBooks!

        Too often I have been bitten by the thing not properly going to sleep because SOMETHING keeps a wake lock (and of course macOS doesn't indicate this anywhere outside of Energy Monitor, nested in System Activity) and overheating in my bag as a result. A simple LED would have been a good visual indicator that it is still awake.

    • By jmkni 2025-08-1217:081 reply

      There's nothing more frustrating than when you type the word you want to type, it changes it to a different word, you delete it and type the word you wanted to type again and then rinse/repeat 3 to 4 times before you have the word you actually wanted.

      And if you're not paying attention, your message ends up looking like you're having a stroke.

      • By mikestew 2025-08-1218:24

        It used to be that if you typed, deleted the correction, and retyped, that spelling would now be the preferred and you wouldn’t have to play that game anymore. Apple broke that years ago.

    • By bcrl 2025-08-1216:24

      I'd be happier if the suggested word didn't move between the time I saw it appear and the time my finger touched the screen.

    • By moi2388 2025-08-1216:062 reply

      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

      • By alpaca128 2025-08-138:36

        > they focus too much on the first letter of the word

        They also do that in Apple Notes. On the iPad the search can only match word prefixes. So if you type "oo" and the entire note consists of just the word "foo", it will find nothing. This doesn't even require fuzzy search, yet they couldn't be bothered while solving the much more difficult handwriting recognition problem.

        Also the iPhone's Settings app still doesn't have all settings in the search index. So it's impossible to find the section "headphone safety" & "reduce loud audio" using words like "headphone", "audio" or "safety". This setting was introduced five years ago, by the way.

      • By bapak 2025-08-132:38

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

        Not true anymore, I just typed fuck in this comment without having to fight it. They made a change I think last year and they even announced it.

        > they do not look at context at all

        Also not true. It's true that they're not perfect at it, but replacement after you typed 2 more words happen specifically because it can tell better what you want to say. Sometimes works against you because language is highly personal.

    • By porridgeraisin 2025-08-1218:23

      Meanwhile, vim's spell checker is one of the best I have used. I recommend reading [:h spell](https://vimhelp.org/spell.txt.html#spell).

      Here are some nice examples (excluding obvious edit distance based ones which it does right)

      "snowbalfight" --> "snowball fight"

      "unrelevant" --> "irrelevant"

      "fone" --> "phone"

      "the the" --> "The"

      And all of this with auto capitalization if it notices you're at the start of a sentence, and stuff like handling proper nouns, punctuations, etc,.

      What I find really interesting is swipe-type spell checking (its basically word prediction) on phones. That is a really cool problem to solve well. Sometimes it works like a dream and other times it's annoying. I wonder how they write those.

    • By eru 2025-08-134:55

      > Is there a reason why Apple's iPhone spellcheck is often really poor, significantly worse than both LLMs and just...human eyes?

      It's somewhat funny that human performance is seen as a baseline here, and not the pinnacle of achievement to aim for.

      (I agree with you. I just find it entertaining.)

    • By nicce 2025-08-1216:044 reply

      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"?

      • By bee_rider 2025-08-1216:45

        These user activated dictionaries tend to be excellent (even in vim, a pretty barebones system, I tend to get fantastic guesses from the machine).

        Actually, come to think of it, the problem must be a bit easier than on smartphones, right? Real keyboard input is very precise. Smartphone keyboards already guess what word you were trying to spell, so they are influencing the typos in the direction of likely words… cannibalizing the very guess list that the dictionary uses!

      • By paradox460 2025-08-1219:22

        Alfred ties into it nicely too, you can type `spell someword` and the completions below have the various spellings of words, fuzzy matched. Select one and the word goes onto your clipboard

      • By socalgal2 2025-08-136:56

        that's great. I usually use the context menu on MacOS and the "Define" option on long press on iOS

        That said, trying to use long press on iOS (or whatever it actually is), is one of those places that often drives me nuts. I don't know if the issue is a specific app or the OS or what but sometimes I want the popup menu to appear and I can't get it to appear. Or I do something to make it appear but it doesn't appear for x hundred milliseconds, during which I think it didn't get my gesture so I start a new one, just as it's finally responding in which case my new gesture dismisses it. Repeat 3-4 times before I'm ready to tear my hair out

        It also shows why canvas based websites suck. Open Google Docs, select a word, press Cmd-Ctrl-D, ... nothing. Try it in gmail (which is not canvas based) and it works.

      • By qmr 2025-08-135:161 reply

        There's also a gesture. Triple three finger tap or some such like.

        • By nicce 2025-08-1311:22

          I think it is actually hard press with single finger.

    • By bell-cot 2025-08-1219:541 reply

      > Is there a reason why ...

      Yes: Apple doesn't care.

      > Does anyone else...

      Yes. I just typed in "Tipografical earer" - and iOS 18.6 suggested "Tipograxical" for the first word, and one of "eared", "eager", and "eater" for the second word.

    • By nwellinghoff 2025-08-134:37

      The spell check is truly bad. It boggles the mind how this is even possible given how solved the problem is everywhere else. Also the period being to the right of the spacebar such that it gets hit instead of space. So annoying!

    • By dlivingston 2025-08-1215:57

      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.

    • By fluidcruft 2025-08-1222:281 reply

      I feel the same way about Android's. It just seems like spell check used to be so much better then years ago. But I'm not sure whether it's comparing mobile with desktop expectations. It really seems extremely dumb on Android.

      • By alpaca128 2025-08-139:06

        When I used Windows Phone 8.1 I felt like I was typing text twice as fast as on Android. Better suggestions, more accurate keyboard inputs on the same screen size, and selecting an entire word was just a single tap which made fixing a typo very quick as well. Meanwhile back then it was impossible to make certain text selections without a bluetooth keyboard because of how Android constantly tried "fixing" touch-based selections. It's sad that Microsoft shut down the only system & UI that felt like the developers were actually thinking of the user when designing it. To this day no other mobile OS is as friendly to left-handed users.

    • By torium 2025-08-1216:161 reply

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

      • By Twisol 2025-08-1216:241 reply

        "Hypo", meaning low; "glyc-", meaning sugar; and "emia", meaning of the blood. "Low sugar of the blood". (With apologies to chubbyemu.)

        Since "typo" comes from "typography", it roughly means "symbolic". So "typoglycemia" should mean "symbolic sugar of the blood". Low typos in your blood would be "hypotypemia".

        I have no idea why "typoglycemia" refers to a human ability to autocorrect, but it brings me joy, so I'm not going to question it ^_^

        • By torium 2025-08-1216:561 reply

          Funny that we know the same obscure youtuber.

          • By golem14 2025-08-133:13

            Really not so obscure: 3.17M subscribers.

    • By reissbaker 2025-08-137:30

      I mean, TBH I would expect this to be true: an LLM is trained over a massive corpus of internet data, which contains many typos, and is required to accurately predict tokens despite edit errors. A spellchecker is typically running a deterministic algorithm really, really quickly, and has hardcoded limits on acceptable edit distance (and has no learned knowledge of what looks correct/incorrect to human eyes). An LLM should generally trounce a spellchecker at figuring out what you meant to type, unless the spellchecker is secretly a tiny LLM / ML model of some kind under the hood.

    • By el_benhameen 2025-08-1220:101 reply

      I have definitely noticed this too. I also use the built in swipe to type feature, and it may as well be a coin flip as to whether it gets the word right. I get that swiping is vague, but even a little bit of frequency prediction would tell you that “sounds good” is going to be more likely than “sings hood”. It’s an absolutely infuriating feature.

      • By cmckn 2025-08-139:58

        This drives me insane.

        I use the swipe feature because I guess I have wide fingertips and frequently hit unintended, adjacent keys when pecking on the keyboard (especially as I’ve gotten older). The words produced by swiping often make no grammatical sense, and are frequently esoteric words that I just can’t believe rank high enough on a basic frequency list to suggest. Not to mention my own vocabulary, which apparently is not considered by the keyboard at all.

        I had a way better experience using SwiftKey on my android phone 15 years ago.

    • By uticus 2025-08-1219:59

      emoticons

  • By yndoendo 2025-08-1215:532 reply

    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 before posting this. In application spell checker was 100% useless with assisting me.

    • By athrowaway3z 2025-08-1216:134 reply

      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.

      • By paol 2025-08-1216:31

        I would like this too. This approach would also fix the most common failure mode of spelling checkers: typos that are accidentally valid words.

        I constantly type "form" instead of "from" for example and spelling checkers don't help at all. Even a simple LLM could easily notice out of place words like that. And LLMs also could easily go further and do grammar and style checking.

      • By NitpickLawyer 2025-08-1217:301 reply

        I've seen this in a UI. They went a step further and you could select a word (well token but anyway) and "regenerate" from that point by selecting another word from the token distribution. Pretty neat. Had the heatmaps that you mentioned, based on probabilities returned by the LLM.

        This should also be pretty cheap (just one pass through the LLM).

      • By anuramat 2025-08-1222:111 reply

        That's how BERT is trained, masked language modeling

        • By dsign 2025-08-135:361 reply

          I've used BERT to do that sort of thing. It was a prototype and I was using Pytorch, also, I'm not an expert on Pytorch performance. I also tried with models that succeeded BERT for masked token. My issue with it is that it was slow :-( . My second issue with it is that it wasn't integrated in my favorite word editor. But definitively useful.

          • By anuramat 2025-08-1514:15

            Did you try any diffusion models? They should be quick enough

      • By simianwords 2025-08-1217:51

        in fact it can work at the language level completely with a prompt like "mark parts of this paragraph that don't flow well".

    • By golem14 2025-08-133:15

      Some new way of Stenography. That everyone can use. Would make taking notes so much easier.

  • By jimt1234 2025-08-1215:432 reply

    Can confirm. The first time I saw an automatic spellchecker was probably with WordStar around 1989, and it blew me away. How can the computer know all the words? That's insane! Sounds lame, but it's true. It was a different world.

    • By torium 2025-08-1216:2110 reply

      Since you're old enough, here's a question for you. Do you remember if at the time the first spellcheckers were invented, people were negative on spellcheckers, because that would mean that soon people would stop learning how to spell and just general dumbing down?

      It seems that anything that helps people gets this reaction these days. On the one hand, the argument 100% resonates with me. On the other hand, spelling isn't really the end, is it? It's just a means to an end, so what's wrong with making the mean easier? Did people worry that you'd stop knowing how to plant potatoes when trading was invented? EDIT: The example doesn't make sense because agriculture is newer than trading, but you got the idea.

      • By mikaelmello 2025-08-1216:24

        “The careless, the inept, the spelling disabled will be able to survive in a world of words by relying on computers to conceal their own weaknesses.”

        https://www.washingtonpost.com/archive/opinions/1985/06/02/t...

      • By runako 2025-08-1216:282 reply

        Not as much with spellcheckers because even when they started to get popular, it was apparent that many people cannot spell English. So it was very natural.

        People pushed back on the grammar checks when they landed in Word.

        Before that, people pushed back on calculators in secondary schools. This was a huge point of contention all classes except trigonometry, and calculators were definitely not allowed in the SAT/ACT.

        • By kergonath 2025-08-1217:591 reply

          > People pushed back on the grammar checks when they landed in Word.

          Word’s grammar checker has improved quite a lot. But I absolutely hate the style checker and its useless advice. Yes, I know how the passive voice works and yes, it is appropriate in this sentence. Also, it’s not really a problem in English but Word still can’t do spaces properly so it wants to put normal spaces everywhere and it’s fucking ugly. I wish it would spend as much time fixing inappropriate breaking spaces (in English as well).

          • By shakna 2025-08-1321:441 reply

            Word's style checker trying to enforce US norms, when the Australian dictionary is in use aggravates me.

            Yes, we use the Oxford comma. We teach it in our schools. Stop trying to tell me its not necessary - the audience expects it!

            • By mrguyorama 2025-08-1323:17

              It was just as useless here in the states:

              "Sentence fragment, consider revising"

              It's dialog in a story you ignorant clod.

        • By Gibbon1 2025-08-1220:21

          What I think is one should question if something is the point of the exercise.

          I'd argue that where writing spelling is something completely arbitrary and thus of no fundamental importance. Arithmetic is the same way, lots of algorithms to do that and they are all valid. So calculators and spell checkers are fine. And you should use them.

          The same is not true for grammar. Getting AI to write an essay for you.

      • By paradox460 2025-08-1219:25

        I remember hearing this as late as the early 00s. I'd buy electronic dictionaries and spell checkers at yard sales and things like that, and use them in class. Multiple teachers were disapproving of it, despite it basically just being a paper book dictionary in a small, TI-92 shaped device. 10 year old me never saw how flipping through some obnoxiously heavy book in the back of the classroom was better than just punching in a few letters, hitting the "show definition", and ensuring I was spelling and using "curmudgeonly" properly.

        Same went for using MacWord vs AppleWorks. MacWord had a built in dictionary, AppleWorks didn't.

      • By bapak 2025-08-132:45

        I think this happens every time something gets automated away, and in a way it's true. I'm sure a lot more accountants knew 123x27 by heart before than they do now. The problem is LLMs take out the whole process of thinking, and that is going to be a problem: you generally need to think even when you're not in front of a screen.

      • By mrweasel 2025-08-1217:002 reply

        > because that would mean that soon people would stop learning how to spell and just general dumbing down?

        I'd argue that negative people where correct. People can't spell anymore, not even with a spellchecker. Maybe they never could? I'm not against spellcheckers, I think they are amazing, but they haven't helped much.

        • By dsign 2025-08-135:44

          WordStar is not the problem, StarWars is. Popular culture has become so vapid that when it comes to writing and the thinking behind writing, most people fare worse than an LLM. I know that old people have been saying this basically since ancient Greece, but it bears repeating: the youth is lost.

      • By aidenn0 2025-08-135:11

        I had an English teacher who allowed submissions only on typewriter or hand-written with spellcheckers mentioned as the reason.

      • By taftster 2025-08-1218:00

        It was the opposite experience for me. Before spellcheck was commonly part of the web browser, I would go back and reread some very early emails and/or usenet posts from myself. And realize how atrocious my spelling was.

        I actually consider spellcheck to have improved my spelling dramatically over the years. The little red squiggles under words have helped me to recognize my misspellings, especially the words that are hard for me to get right consistently.

      • By KineticLensman 2025-08-1216:37

        I don't remember any particular negative reaction to spell-checkers like the 'calculator panic'.

        Perhaps partly because most schoolkids then wouldn't have been using word processors as their main writing tool at school and people using them in a corporate environment were pleased not to make embarrassing errors in their emails.

      • By cruffle_duffle 2025-08-1217:00

        I remember that! People were worried we’d all forget how to spell stuff.

      • By jimt1234 2025-08-1217:40

        As I recall, there was some, but not a lot of FUD around spellcheckers, mostly because personal computers were still relatively new. Most GenX parents (Boomers) didn't even know what personal computers were yet, so they didn't know enough to be concerned. (I grew up in Missouri, which was the Digital Stone Age back then.) At the time, I think their complaining was more focused on MTV and video games.

        However, also sounds weird, but I recall myself and some of my peers questioning spellcheckers, "Why do I need this?", because spelling was a primary mission of our education. We were all raised constantly being tested on spelling. In fact, I think I disabled the spellchecker on my old-ass 286 because it caused delays in the overall experience.

    • By NitpickLawyer 2025-08-1217:33

      I had the same thing when the Encarta CDs started to include pronunciation tests. You'd get a word, speak it in the microphone, and get a "score" on how well you pronounced that word. Knowing what I know now, it was probably pretty inaccurate and hand wavy, but in the early 90s that was an absolutely amazing experience for an ESL person.

HackerNews