MCPcopy Create free account
hub / github.com/SpecterOps/DeepPass2 / _string_overlap_ratio

Function _string_overlap_ratio

test/testDeeppass2.py:49–53  ·  view source on GitHub ↗
(s1, s2, min_ratio=0.5)

Source from the content-addressed store, hash-verified

47
48
49def _string_overlap_ratio(s1, s2, min_ratio=0.5):
50 if not s1 or not s2:
51 return s1 == s2 # Both empty or one empty
52 similarity = SequenceMatcher(None, s1.lower(), s2.lower()).ratio()
53 return similarity >= min_ratio
54
55
56def _areEqualOverlapStrings(y_true, y_pred, min_overlap=0.5, string_min_ratio=0.5):

Callers 2

_areEqualOverlapStringsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected