File size: 1,230 Bytes
7527970 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
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
|