From d11b812a0e42b5e2b4efc32be598fcb1dc3063e7 Mon Sep 17 00:00:00 2001 From: maxbachmann Date: Thu, 26 Mar 2020 20:28:09 +0100 Subject: [PATCH] round result --- stix2/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stix2/environment.py b/stix2/environment.py index dee4479..2a7fcee 100644 --- a/stix2/environment.py +++ b/stix2/environment.py @@ -364,7 +364,7 @@ def partial_string_based(str1, str2): """ from rapidfuzz import fuzz - result = fuzz.token_sort_ratio(str1, str2) + result = round(fuzz.token_sort_ratio(str1, str2)) logger.debug("--\t\tpartial_string_based '%s' '%s'\tresult: '%s'", str1, str2, result) return result / 100.0