How to write your own spellchecker and autocorrect algorithm in under 80 lines of code

{the: 85039, it: 68904, a: 68598 ... }
  • add a letter: ‘teh’ -> ‘ateh, bteh, cteh, dteh,….,tehy, tehz’
  • remove a letter: ‘teh’ -> ‘eh, te, th’
  • substitute a letter: ‘teh’ -> ‘aeh, beh, ceh,…,tey, tez’
  • switch two adjacent letters: ‘teh’ -> ‘hte, the’

--

--

--

CEO, Codesmith

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Will Sentance

Will Sentance

CEO, Codesmith

More from Medium

Reuse RabbitMQ connection

What are the things to consider before hiring a node.js developer?

Auth0 manual id_token validation with Node.js

Express vs Koa — A Quick Comparison