HOW TO: Coding a Statistical Spellcheck

Technology
HOW TO: Coding a Statistical Spellcheck

spellcheck_20070409.jpg
Have you ever been curious about how some applications, such as MS Word or Google, can return spelling suggestions so quickly and accurately?

Chances are, they are using a fairly straightforward probabilistic model, trained on a sample dictionary of common words and phrases, to determine when a word has been misspelled and to suggest the most likely alternate spelling. With a little effort and a small amount of code, you can add similar functionality to your own applications!

“Let’s get right to it. I figured that in less than a plane flight, and in less than a page of code, I could write a spelling corrector that achieves 80 or 90% accuracy at a rate of at least 10 words per second. And in fact, here, in 20 lines of Python 2.5 code, is the complete spelling corrector” –Link.

Related:

Discuss this article with the rest of the community on our Discord server!
Tagged

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK