Skip to content
Snippets Groups Projects
Commit 61bbc3bb authored by Konrad Wojtasik's avatar Konrad Wojtasik
Browse files

Merge branch '1-save-output-as-a-json-not-as-string' into 'master'

Change output type from json txt to jsonl

Closes #1

See merge request !2
parents 01f65fd9 a0e8db40
No related branches found
No related tags found
1 merge request!2Change output type from json txt to jsonl
Pipeline #11421 failed
......@@ -31,7 +31,7 @@ class EasymatcherWorker(nlp_ws.NLPWorker):
document["text"] = _df.read()
with open(file_path, "a", encoding="utf-8") as _f:
_f.write(f"{json.dumps(document)}\n")
_f.write(json.dumps(document) + "\n")
def process(
self,
......@@ -84,4 +84,4 @@ class EasymatcherWorker(nlp_ws.NLPWorker):
with open(output_path, "w", encoding="utf-8") as _f:
for out_document in out_documents:
_f.write(f"{json.dumps(out_document)}\n")
_f.write(json.dumps(out_document) + "\n")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment