Percentage matching of text
Steve Christensen
stnchris at xmission.com
Mon Aug 9 18:54:55 EDT 2004
In article <mailman.958.1091195562.5135.python-list at python.org>, Bruce
Eckel wrote:
>
> What I'd like to do is find an algorithm that produces the results of
> a text comparison as a percentage-match. Thus I would be able to
> assert that my test samples must match the control sample by at least
> (for example) 83% for the test to pass. Clearly, this wouldn't be a
> perfect test but it would help flag problems, which is primarily what
> I need.
>
> Does anyone know of an algorithm or library that would do this? Thanks
> in advance.
>
Have you come across the following yet?
Levenshtein C extension module for Python:
http://trific.ath.cx/resources/python/levenshtein/
And/or:
http://hetland.org/python/distance.py
-Steve
More information about the Python-list
mailing list