Skip to content

Commit

Permalink
Update jaro.py
Browse files Browse the repository at this point in the history
  • Loading branch information
elmoiv authored Jun 15, 2020
1 parent c09eda8 commit 17ed39e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azapi/jaro.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Python3 implementation of above approach
# Source: https://www.geeksforgeeks.org/jaro-and-jaro-winkler-similarity/
# This code is contributed by mohit kumar 29 (GeeksforGeeks.com)
from math import floor, ceil
from math import floor

def jaro_distance(s1, s2):
if (s1 == s2):
Expand Down Expand Up @@ -37,4 +37,4 @@ def jaro_distance(s1, s2):
t = t//2

return (match/ len1 + match / len2 +
(match - t + 1) / match)/ 3.0
(match - t + 1) / match)/ 3.0

0 comments on commit 17ed39e

Please sign in to comment.