aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-10-28 14:55:14 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-10-28 14:55:14 +0200
commitf175ef84d070b8c6ab231836e469d7d5d1b81c28 (patch)
tree6dc475649baf2a100960c794313fba8bf5bfe40d
parentd8dfa06ee9694655df3f51823deff4e9a63971c6 (diff)
downloadrefcat-f175ef84d070b8c6ab231836e469d7d5d1b81c28.tar.gz
refcat-f175ef84d070b8c6ab231836e469d7d5d1b81c28.zip
tasks: fix json key
-rw-r--r--python/refcat/tasks.py6
1 files changed, 4 insertions, 2 deletions
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(