(row: Dict[str, Any])
| 168 | |
| 169 | |
| 170 | def paper_identity(row: Dict[str, Any]) -> str: |
| 171 | explicit_identity = str(row.get("paper_identity") or "").strip() |
| 172 | if explicit_identity: |
| 173 | return explicit_identity |
| 174 | for key in ("paper_id", "doi", "arxiv_id", "openalex_id", "semantic_scholar_id", "url"): |
| 175 | value = str(row.get(key) or "").strip().casefold() |
| 176 | if value: |
| 177 | return f"{key}:{value}" |
| 178 | return "title:" + normalize_phrase_text(row.get("title")) |
| 179 | |
| 180 | |
| 181 | def identity_aliases(row: Dict[str, Any]) -> set[str]: |
no test coverage detected