(row: Dict[str, Any])
| 258 | |
| 259 | |
| 260 | def paper_identity(row: Dict[str, Any]) -> str: |
| 261 | explicit_identity = str(row.get("paper_identity") or "").strip() |
| 262 | if explicit_identity: |
| 263 | return explicit_identity |
| 264 | for key in ("paper_id", "doi", "arxiv_id", "url"): |
| 265 | value = str(row.get(key) or "").strip().casefold() |
| 266 | if value: |
| 267 | return f"{key}:{value}" |
| 268 | return "title:" + normalize_phrase_text(row.get("title")) |
| 269 | |
| 270 | |
| 271 | def build_idf_from_texts(texts: Sequence[Any]) -> Dict[str, float]: |
no test coverage detected