Find closest match for misspelled city names?

I have a list of cities that have numerous incorrect spelling for the same city. One city is misspelled 18 times! I am trying to clean this up but its taking hours. Is there some algorithm that might "guess" at the valid city name for each of these misspelled ones? Some form of weighting? The data is in MySQL and I do have a table of the correct spelling as well to compare against.

Any ideas on this? A PHP example would help if possible.

5
задан Daniel Vandersluis 18 August 2010 в 18:14
поделиться