(row: Dict[str, Any])
| 70 | |
| 71 | |
| 72 | def row_topics(row: Dict[str, Any]) -> Set[str]: |
| 73 | topics: Set[str] = set() |
| 74 | for key in ("topics", "keywords", "direction_terms", "oracle_matched_topics", "drift_topics", "reading_signal_topics"): |
| 75 | for value in flatten_topics(row.get(key)): |
| 76 | normalized = normalize_topic(value) |
| 77 | if normalized: |
| 78 | topics.add(normalized) |
| 79 | return topics |
| 80 | |
| 81 | |
| 82 | def topic_match(row: Dict[str, Any], target_topics: Set[str]) -> bool: |
no test coverage detected