diff options
Diffstat (limited to 'python/sandcrawler/grobid.py')
-rw-r--r-- | python/sandcrawler/grobid.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/sandcrawler/grobid.py b/python/sandcrawler/grobid.py index 70f7b16..9fd5ad4 100644 --- a/python/sandcrawler/grobid.py +++ b/python/sandcrawler/grobid.py @@ -62,10 +62,12 @@ class GrobidClient(object): meta = dict() biblio = dict() for k in ('title', 'authors', 'journal', 'date', 'doi', ): - biblio[k] = tei_json.get(k) + if tei_json.get(k): + biblio[k] = tei_json[k] meta['biblio'] = biblio for k in ('grobid_version', 'grobid_timestamp', 'fatcat_release', 'language_code'): - meta[k] = tei_json.get(k) + if tei_json.get(k): + meta[k] = tei_json[k] return meta class GrobidWorker(SandcrawlerWorker): |