Levenshtein Distance
I love reading about random things sometimes. Browsing stackoverflow and clicking around i ended on a post about Fuzzy Text Searches that mentioned Levenshtein distance, and i jumped over to wikipedia to learn what the heck that is.
In information theory and computer science, the Levenshtein distance is a metric for measuring the amount of difference between two sequences
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:
1. kitten → sitten (substitution of ’s’ for ‘k’
2. sitten → sittin (substitution of ‘i’ for ‘e’)
3. sittin → sitting (insert ‘g’ at the end).Source: http://en.wikipedia.org/wiki/Levenshtein_distance
NEAT! So something used in order to determine how similar/different two strings are, like a speller checker.
Turns out there is a www.levenshtein.net that shows explains it, has some demos, and explains how to impliment it. On the front page there is even a nice little matrix that showcases how it decides how ‘change’ count