How does google do the "did you mean...."?

Quoting Ben Johnson <>:

I have a search on my website that search names, so I know all of the values they could enter. How do I do something like google where if I type jonson it would say "did you mean johnson"?

Any ideas?


Pete Norvig explains how he did it:

There's also a plugin for the feature: