Jump to: navigation, search

Levenshtein distance

From w3cyberlearnings

Example

For example, the Levenshtein distance between "kitten" and "sitting" is 3, since the following three edits change one into the other, and there is no way to do it with fewer than three edits:

kitten → sitten (substitution of 's' for 'k')
sitten → sittin (substitution of 'i' for 'e')
sittin → sitting (insertion of 'g' at the end).

PHP Levenshtein

levenshtein() function to returns the Levenshtein distance between two strings.

Reference Source

From Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Levenshtein_distance

Navigation
Web
SQL
MISC
References