diff options
-rw-r--r-- | python/refcat/tasks.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index 7cf346b..086dbc4 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -1571,8 +1571,11 @@ class UnmatchedRefsReparse(Refcat): citations = grobid_tei_xml.parse_citations_xml(grobid_resp.text) if len(citations) == 0: continue - json.dump(citations[0].to_dict(), output) - output.write("\n") + # self.logger.debug("[parsing] {} sent, {} from grobid, for {}, {}".format( + # len(unstructured), len(grobid_resp.text), unstructured, citations)) + data = json.dumps(citations[0].to_dict()) + output.write(data.encode("utf-8")) + output.write(b"\n") def output(self): |