Skip to content
Snippets Groups Projects
Commit eb918339 authored by Jakub-Goluch's avatar Jakub-Goluch
Browse files

Add option to read jsonl files

parent b736bb63
Branches
1 merge request!4Resolve "Read not only .txt files"
Pipeline #11166 passed with stages
in 5 minutes and 36 seconds
......@@ -27,7 +27,7 @@ class EasymatcherWorker(nlp_ws.NLPWorker):
) -> None:
"""Formats and appends plain texts into jsonl file."""
document = {}
if document_path.endswith(".jsonl"):
if str(document_path).endswith(".jsonl"):
with open(file_path, "a", encoding="utf-8") as _f:
with open(document_path, "r", encoding="utf-8") as _df:
for line in _df:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment