-1

Possible Duplicate:
How do you implement a “Did you mean”?

Is there a web service or public api that would allow your app to to check for obvious misspellings in the names of famous people:

Mikul Jaxon
Prinz Charlz
Britnie Speers

Or would this require building a database of your own?

I'd like to have something like Google's "Did you mean ... ?" feature, where they suggest corrections when you misspell something. In my case I just need it for famous people.

Community
  • 1
  • 1
  • a spellchecker for celebrity names is a very specific requirement. Have a look at Peter Norvig's algorithm: http://norvig.com/spell-correct.html – McDowell Dec 19 '10 at 13:12
  • Mikul Jaxon wouldn't get picked up by Google - it only looks for words that are different by a small number of letters. – Skilldrick Dec 19 '10 at 13:14

1 Answers1

0

you should check out the fuziness search of apache solr/lucene. maby a fuzzy search or autocompletion is a better apporach as it will be faster.

however the easiest and still very fast implementation i have seen was to build up an index of token documenst that are weighted by relevance.

then you can run your query in "or-conjunction" against that table and fetch the results of how many tokens your string consists.

then you can easily determine which word corresponds to the words in your query by calculating the Levenshtein_distance.

The Surrican
  • 29,118
  • 24
  • 122
  • 168