Alex Rivera | Logout

Implementation of Levenshtein distance for mysql/fuzzy search?

Asked 2009-03-11T15:15:08.170
52

I would like to be able to search a table as follows for smith as get everything that it within 1 variance.

Data:

O'Brien
Smithe
Dolan
Smuth
Wong
Smoth
Gunther
Smiht

I have looked into using Levenshtein distance does anyone know how to implement this with it?

Edit
Report

1 Answer

5

An implementation for the damerau-levenshtein distance can be found here: Damerau-Levenshtein algorithm: Levenshtein with transpositions The improvement over pure Levenshtein distance is that the swapping of characters is considered. I found it in the comments of schnaader's link, thanks!

answered 2009-03-13T11:48:34.707

Your Answer