/ Published in: Python
http://docs.python.org/library/difflib.html
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
>>> import difflib >>> difflib.SequenceMatcher(None, 'abcde', 'abcde').ratio() 1.0 >>> difflib.SequenceMatcher(None, 'abcde', 'zbcde').ratio() 0.80000000000000004 >>> difflib.SequenceMatcher(None, 'abcde', 'zyzzy').ratio() 0.0
URL: http://stackoverflow.com/questions/682367/good-python-modules-for-fuzzy-string-comparison