remove round from `fuzz.token_sort_ratio(str1, str2)` call
parent
457085a115
commit
bf66744db3
|
@ -365,7 +365,7 @@ def partial_string_based(str1, str2):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from rapidfuzz import fuzz
|
from rapidfuzz import fuzz
|
||||||
result = round(fuzz.token_sort_ratio(str1, str2))
|
result = fuzz.token_sort_ratio(str1, str2)
|
||||||
logger.debug("--\t\tpartial_string_based '%s' '%s'\tresult: '%s'", str1, str2, result)
|
logger.debug("--\t\tpartial_string_based '%s' '%s'\tresult: '%s'", str1, str2, result)
|
||||||
return result / 100.0
|
return result / 100.0
|
||||||
|
|
||||||
|
|
|
@ -787,7 +787,7 @@ def test_semantic_equivalence_prop_scores():
|
||||||
tool2 = stix2.v21.Tool(id=TOOL_ID, **TOOL2_KWARGS)
|
tool2 = stix2.v21.Tool(id=TOOL_ID, **TOOL2_KWARGS)
|
||||||
stix2.Environment().semantically_equivalent(tool1, tool2, prop_scores)
|
stix2.Environment().semantically_equivalent(tool1, tool2, prop_scores)
|
||||||
assert len(prop_scores) == 4
|
assert len(prop_scores) == 4
|
||||||
assert round(prop_scores["matching_score"], 1) == 8.8
|
assert round(prop_scores["matching_score"], 1) == 8.9
|
||||||
assert round(prop_scores["sum_weights"], 1) == 100.0
|
assert round(prop_scores["sum_weights"], 1) == 100.0
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue