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

Function _paper_topic_candidates

agents/feedback-agent/main.py:132–140  ·  view source on GitHub ↗
(paper: Dict[str, Any])

Source from the content-addressed store, hash-verified

130
131
132def _paper_topic_candidates(paper: Dict[str, Any]) -> List[str]:
133 candidates: List[str] = []
134 for key in ("topics", "keywords", "categories"):
135 value = paper.get(key) or []
136 if isinstance(value, list):
137 candidates.extend(str(item).strip() for item in value if str(item).strip())
138 elif isinstance(value, str) and value.strip():
139 candidates.append(value.strip())
140 return canonicalize_direction_terms(candidates, keep_unknown=True)
141
142
143def _build_contrastive_signals(selected: Set[int], skipped: Set[int], papers: List[Dict]) -> List[str]:

Callers 1

Calls 2

getMethod · 0.80

Tested by

no test coverage detected