ncoop57 commited on
Commit
2993b19
1 Parent(s): 6bcce19

Updating module

Browse files
Files changed (1) hide show
  1. levenshtein_distance.py +1 -1
levenshtein_distance.py CHANGED
@@ -77,7 +77,7 @@ def _dist(A, B, insertion, deletion, substitution):
77
  def levenshtein_distance(l1, l2, normalize=False):
78
  dist = _dist(l1, l2, 1, 1, 1)[-1][-1]
79
  if normalize:
80
- return 1. - dist / max(len(l1), len(l2))
81
  else:
82
  return dist
83
 
 
77
  def levenshtein_distance(l1, l2, normalize=False):
78
  dist = _dist(l1, l2, 1, 1, 1)[-1][-1]
79
  if normalize:
80
+ return dist / max(len(l1), len(l2))
81
  else:
82
  return dist
83