We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2efcfe7 + 060e137 commit 0e7b9ecCopy full SHA for 0e7b9ec
strsimpy/ngram.py
@@ -46,7 +46,7 @@ def distance(self, s0, s1):
46
for i in range(min(sl, tl)):
47
if s0[i] == s1[i]:
48
cost += 1
49
- return 1.0 * cost / max(sl, tl)
+ return 1.0 - cost / max(sl, tl)
50
51
sa = [''] * (sl + self.n - 1)
52
0 commit comments