| 1272 | return occurrences >= len(text_parts) |
| 1273 | |
| 1274 | def find_fuzzy_match( |
| 1275 | self, |
| 1276 | item: str, |
| 1277 | pattern: re.Pattern[str], |
| 1278 | under_words_text: list[str], |
| 1279 | case_words_text: list[str], |
| 1280 | ) -> int | None: |
| 1281 | if pattern.search(item.lower()): |
| 1282 | return Fuzziness.REGEX |
| 1283 | |
| 1284 | under_words_item = [x for x in item.lower().split('_') if x] |
| 1285 | if self.word_parts_match(under_words_text, under_words_item): |
| 1286 | return Fuzziness.UNDER_WORDS |
| 1287 | |
| 1288 | case_words_item = re.split(_CASE_CHANGE_PAT, item) |
| 1289 | if self.word_parts_match(case_words_text, case_words_item): |
| 1290 | return Fuzziness.CAMEL_CASE |
| 1291 | |
| 1292 | return None |
| 1293 | |
| 1294 | def find_fuzzy_matches( |
| 1295 | self, |