MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / topic_match

Function topic_match

experiments/human_eval/build_drift_human_eval_packet.py:82–88  ·  view source on GitHub ↗
(row: Dict[str, Any], target_topics: Set[str])

Source from the content-addressed store, hash-verified

80
81
82def 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
91def load_drift_events(path: Path) -> List[Dict[str, Any]]:

Callers 2

choose_event_rowsFunction · 0.70
build_rowsFunction · 0.70

Calls 3

row_topicsFunction · 0.85
getMethod · 0.80
normalize_topicFunction · 0.70

Tested by

no test coverage detected