(row: Dict[str, Any], target_topics: Set[str])
| 80 | |
| 81 | |
| 82 | def topic_match(row: Dict[str, Any], target_topics: Set[str]) -> bool: |
| 83 | if not target_topics: |
| 84 | return False |
| 85 | if row_topics(row).intersection(target_topics): |
| 86 | return True |
| 87 | text = normalize_topic(f"{row.get('title', '')} {row.get('abstract', '')}") |
| 88 | return any(topic and topic in text for topic in target_topics) |
| 89 | |
| 90 | |
| 91 | def load_drift_events(path: Path) -> List[Dict[str, Any]]: |
no test coverage detected