(row: Dict[str, Any], target_topics: Set[str])
| 144 | |
| 145 | |
| 146 | def topic_match(row: Dict[str, Any], target_topics: Set[str]) -> bool: |
| 147 | if not target_topics: |
| 148 | return False |
| 149 | row_topics = row_topic_set(row) |
| 150 | if row_topics.intersection(target_topics): |
| 151 | return True |
| 152 | |
| 153 | # As a fallback, allow exact normalized phrase hits in title/abstract. |
| 154 | text = normalize_topic(f"{row.get('title', '')} {row.get('abstract', '')}") |
| 155 | return any(topic and topic in text for topic in target_topics) |
| 156 | |
| 157 | |
| 158 | def episode_id_for(row: Dict[str, Any]) -> str: |
no test coverage detected