1

What is the typical algorithm used by online search engines to make suggestions for misspelled words. I'm not necessarily talking about Google, but any site with a search feature, such as as Amazon.com for instance. Say I search for the word "shoo"; the site will come back and say "did you mean: shoe".

Is this some variation of the Levenshtein distance algorithm? Perhaps if they are using some full text search framework (like lucene for instance) this is built in? Maybe fully custom?

I know the answer varies a lot, I'm just looking for an indication on how to get started with this (in an enterprise environment).

oym
  • 6,983
  • 16
  • 62
  • 88
  • 2
    One inelegant but relevant possibility is to collect and analyze actual user data - how people revise their queries, the pages that people click on, etc. Another consideration is approximate phonetic matching such as [Soundex](http://en.wikipedia.org/wiki/Soundex)/etc. – Nayuki Jan 26 '12 at 03:48
  • Nayuki - very interesting suggestions, especially Soundex, I had not heard of that. – oym Jan 26 '12 at 04:06
  • Usually it is called spellchecking or fuzzy search. – amirouche Jun 28 '20 at 11:20

0 Answers0