(s1, s2, min_ratio=0.5)
| 47 | |
| 48 | |
| 49 | def _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 | |
| 56 | def _areEqualOverlapStrings(y_true, y_pred, min_overlap=0.5, string_min_ratio=0.5): |
no outgoing calls
no test coverage detected