Skip to content

Commit

Permalink
Merge pull request #92 from KKGBiz/master
Browse files Browse the repository at this point in the history
Levenstein distance output type normalization
  • Loading branch information
orsinium authored Apr 24, 2024
2 parents 65c5e84 + 51711e0 commit 482f349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion textdistance/algorithms/edit_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _cycled(self, s1: Sequence[T], s2: Sequence[T]) -> int:
dist = self.test_func(s1[r - 1], s2[c - 1])
edit = prev[c - 1] + (not dist)
cur[c] = min(edit, deletion, insertion)
return cur[-1]
return int(cur[-1])

def __call__(self, s1: Sequence[T], s2: Sequence[T]) -> int:
s1, s2 = self._get_sequences(s1, s2)
Expand Down

0 comments on commit 482f349

Please sign in to comment.