We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3a3c2e commit f102e07Copy full SHA for f102e07
1 file changed
fuzzymatcher/utils.py
@@ -1,9 +1,6 @@
1
from metaphone import doublemetaphone
2
-import warnings
3
-
4
from fuzzywuzzy.fuzz import ratio
5
6
7
def tokens_to_dmetaphones(tokens):
8
new_tokens = []
9
for t in tokens:
@@ -43,13 +40,7 @@ def is_mispelling(token_left, token_right):
43
40
if len(dml.intersection(dmr).difference({''})) > 0:
44
41
return True
45
42
46
- if levenshtein_installed:
47
- this_ratio = ratio(token_left, token_right)
48
- else:
49
- sm = SequenceMatcher(None, "hi", "hit")
50
- this_ratio = sm.ratio(token_left, token_right)
51
52
- if this_ratio >= 90:
+ if ratio(token_left, token_right) >= 90:
53
54
55
return False
0 commit comments