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

Function row_topics

experiments/human_eval/build_drift_human_eval_packet.py:72–79  ·  view source on GitHub ↗
(row: Dict[str, Any])

Source from the content-addressed store, hash-verified

70
71
72def 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
82def topic_match(row: Dict[str, Any], target_topics: Set[str]) -> bool:

Callers 1

topic_matchFunction · 0.85

Calls 3

flatten_topicsFunction · 0.85
getMethod · 0.80
normalize_topicFunction · 0.70

Tested by

no test coverage detected