From e813056fd25f5d5130c8bbfee4582932fc3842b8 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 29 Jan 2019 17:03:55 -0800 Subject: tweaks to GROBID metadata import --- python/fatcat_tools/importers/grobid_metadata.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/fatcat_tools/importers/grobid_metadata.py b/python/fatcat_tools/importers/grobid_metadata.py index bd22a6e0..d693bc0a 100644 --- a/python/fatcat_tools/importers/grobid_metadata.py +++ b/python/fatcat_tools/importers/grobid_metadata.py @@ -110,7 +110,7 @@ class GrobidMetadataImporter(EntityImporter): if raw.get(key): cite_extra[key] = clean(raw[key]) if raw.get('authors'): - cite_extra['author'] = [clean(a['name']) for a in raw['authors']] + cite_extra['authors'] = [clean(a['name']) for a in raw['authors']] if not cite_extra: cite_extra = None @@ -127,9 +127,8 @@ class GrobidMetadataImporter(EntityImporter): release_year = int(obj['date'][:4]) extra = dict() - if obj.get('doi'): - extra_grobid['doi'] = obj['doi'] + extra['doi'] = obj['doi'] if obj['journal'] and obj['journal'].get('name'): extra['container_name'] = clean(obj['journal']['name']) -- cgit v1.2.3