Nabeel Alzahrani <nalza...@ucr.edu> added the comment:
Here are the steps that I used to calculate 0.2 for the last example: I used class difflib.HtmlDiff to find the number of changed chars (addedChars, deletedChars, and changedChars) which is 1172 (let us call it delta) The size of both strings a and b in this example is 1470 I calculated the similality ratio using 1-(delta/totalSize) = 1-(1172/1470)=0.2 I am assuming both classes difflib.SequenceMatcher and difflib.HtmlDiff are both using the same algorithms and arguments and if so they should produce the same ratio. Is that right? ---------- status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45180> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com