From f175ef84d070b8c6ab231836e469d7d5d1b81c28 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 28 Oct 2021 14:55:14 +0200 Subject: tasks: fix json key --- python/refcat/tasks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index 4265050..d42bfa5 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -1552,9 +1552,11 @@ class UnmatchedRefsReparse(Refcat): if i % 100000 == 0: self.logger.debug("@{}".format(i)) doc = json.loads(line) - if not "unstructured" in doc: + if not "biblio" in doc: continue - unstructured = doc["unstructured"] + if not "unstructured" in doc["biblio"]: + continue + unstructured = doc["biblio"]["unstructured"] if len(unstructured) < 5: continue grobid_resp = requests.post( -- cgit v1.2.3