Files
paper-atlas/paper_atlas/io/publication_ids.py
T
2026-11-06 22:39:55 +08:00

12 lines
459 B
Python

"""Stable identities from publisher-owned metadata self-links."""
import re
from urllib.parse import urlsplit
def mlsys_id(url):
parsed = urlsplit(url)
if parsed.scheme not in ('https', 'http') or parsed.netloc != 'proceedings.mlsys.org':
return None
match = re.fullmatch(r'/paper(?:_files/paper)?/((?:19|20)\d{2})/hash/([a-f0-9]{32})-Abstract(?:-Conference)?\.html', parsed.path)
return match[1] + '/' + match[2] if match else None