More than often, we have to deal with users who create multiple accounts on the same service.
The following article provide an nice way to regroup similar accounts using the “Levenshtein Distance” to catch typo in user name fields.
The implementation relies on Perl but the principle is easily adaptable to other languages.
http://proudtouseperl.com/2009/04/dealing-with-duplicate-person-data.html