use rapidfuzz instead of fuzzywuzzy
parent
e8035863b8
commit
9388a9820f
2
setup.py
2
setup.py
|
@ -65,6 +65,6 @@ setup(
|
|||
},
|
||||
extras_require={
|
||||
'taxii': ['taxii2-client'],
|
||||
'semantic': ['haversine', 'fuzzywuzzy'],
|
||||
'semantic': ['haversine', 'rapidfuzz'],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -363,8 +363,8 @@ def partial_string_based(str1, str2):
|
|||
float: Number between 0.0 and 1.0 depending on match criteria.
|
||||
|
||||
"""
|
||||
from fuzzywuzzy import fuzz
|
||||
result = fuzz.token_sort_ratio(str1, str2, force_ascii=False)
|
||||
from rapidfuzz import fuzz
|
||||
result = fuzz.token_sort_ratio(str1, str2)
|
||||
logger.debug("--\t\tpartial_string_based '%s' '%s'\tresult: '%s'", str1, str2, result)
|
||||
return result / 100.0
|
||||
|
||||
|
|
Loading…
Reference in New Issue