Looking for library to estimate likeness of two strings

Jeff Schwab jeff at schwabcenter.com
Wed Feb 6 22:52:06 EST 2008


Steven D'Aprano wrote:
> On Wed, 06 Feb 2008 17:32:53 -0600, Robert Kern wrote:
> 
>> Jeff Schwab wrote:
> ...
>>> If the strings happen to be the same length, the Levenshtein distance
>>> is equivalent to the Hamming distance.
> ...
>> I'm afraid that it isn't. Using Magnus Lie Hetland's implementation:
> ...

> I can confirm Robert's results, using a different implementation of the 
> Levenshtein edit distance. It isn't true that Levenshtein simplifies to 
> Hamming when the strings are equal length.

Whoops!  My mistake.



More information about the Python-list mailing list