4

I wonder how Google find the exact word, even if we mistyped it in search box. I want to know if such open source algorithm is available?

sashkello
  • 17,306
  • 24
  • 81
  • 109
vipin k.
  • 2,633
  • 5
  • 22
  • 27
  • 1
    Possible duplicate: http://stackoverflow.com/questions/307291/how-does-the-google-did-you-mean-algorithm-work – jamesaharvey Oct 12 '09 at 11:50
  • 2
    Google actually collects information about users who search for a mistyped word, don't find what they search for and then correct the word. They simply crush the problem with tons and tons of data. So if 100 people mistype "searech", find nothing and then type "search", then Google knows that "search" is a very probably correct spelling of "searech". – Joachim Sauer Oct 12 '09 at 11:51
  • 1
    @vipin k., @Damien - was that missspellling of the tittle deliberete? – Dominic Rodger Oct 12 '09 at 12:01

5 Answers5

5

Check out Peter Norvig's How to Write a Spelling Corrector article.

Nick Dandoulakis
  • 42,588
  • 16
  • 104
  • 136
4

Take a look at this Python Implementation of a suggester, which implements something similar (though no doubt not as clever as Google's) to what Google does.

Dominic Rodger
  • 97,747
  • 36
  • 197
  • 212
4

Reading the Wikipedia entry on Levenshtein distance should give you a better idea of how to detect misspellings.

jamesaharvey
  • 14,023
  • 15
  • 52
  • 63
2

Or if you're using java, check out Compass's support of the "Did you mean feature", and also this blogpost containing an improvement to the original feature.

msp
  • 3,272
  • 7
  • 37
  • 49
0

Actually Google uses a different algorithm. How does the Google "Did you mean?" Algorithm work?

If I search for poeple, I will probably realize my mistake and then search for people. Google tracks these trends and when you search for a word that many people usually look for a similar word afterward it suggests this word to you on your first search.

Community
  • 1
  • 1
Gilles
  • 5,269
  • 4
  • 34
  • 66