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

Function topic_match

experiments/drift/build_drift_adaptation_experiment.py:146–155  ·  view source on GitHub ↗
(row: Dict[str, Any], target_topics: Set[str])

Source from the content-addressed store, hash-verified

144
145
146def 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
158def episode_id_for(row: Dict[str, Any]) -> str:

Callers 2

topic_window_metricsFunction · 0.70
adaptation_delay_daysFunction · 0.70

Calls 3

row_topic_setFunction · 0.85
getMethod · 0.80
normalize_topicFunction · 0.70

Tested by

no test coverage detected