from __future__ import annotations from scripts.defextra_markers import normalize_doi, normalize_paper_id PDF_ALIAS_MAP: dict[str, list[str]] = { # Info Processing & Management DOI mapped to Elsevier PII stems. "10.1016/j.ipm.2021.102505": [ "S0306457321000157", "1-s2.0-S0306457321000157-main", "S0957417423021437", "1-s2.0-S0957417423021437-main", ], "j.ipm.2021.102505": [ "S0306457321000157", "1-s2.0-S0306457321000157-main", "S0957417423021437", "1-s2.0-S0957417423021437-main", ], "dx.doi.org/https://doi.org/10.1016/j.ipm.2021.102505": [ "S0306457321000157", "1-s2.0-S0306457321000157-main", "S0957417423021437", "1-s2.0-S0957417423021437-main", ], } def candidate_pdf_aliases( paper_id: str, doi: str, arxiv: str, ) -> list[str]: keys = { (paper_id or "").strip(), normalize_paper_id(paper_id or ""), (doi or "").strip(), normalize_doi(doi or ""), (arxiv or "").strip(), } aliases: list[str] = [] for key in keys: if not key: continue aliases.extend(PDF_ALIAS_MAP.get(key, [])) return aliases