INNER CODE UNIT · Python

_normalize_arxiv_id

lopusz/awesome-interpretable-machine-learning · sbin/gener_readme.py:142

    def _normalize_arxiv_id(arxiv_id):
        return arxiv_id.replace('oai:arXiv.org:', '')

    met = {}
    title_raw = met_raw['GetRecord']['record']['metadata']['arXiv']['title']
    authors_raw = met_raw['GetRecord']['record']['metadata']['arXiv']['authors']['author']
    if not isinstance(authors_raw, collections.Sequence):
        authors_raw = [ authors_raw ]
    met['title'] = _normalize_title(title_raw)
    met['authors'] = _normalize_authors(authors_raw)
    arxiv_id_raw = met_raw['GetRecord']['record']['header']['identifier']
    met['arxiv_id'] = _normalize_arxiv_id(arxiv_id_raw)
    created = met_raw['GetRecord']['record']['metadata']['arXiv']['created']

    if created is not None:
        met['year'] = created[0:4]
    try:
        doi = met_raw['GetRecord']['record']['metadata']['arXiv']['doi']

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…