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

Add feature to check whether document has a valid json/jsonl format, add tests

parent 8864e268
Branches
1 merge request!4Resolve "Read not only .txt files"
Pipeline #11287 passed with stages
in 7 minutes and 8 seconds
......@@ -25,7 +25,7 @@ class EasymatcherWorker(nlp_ws.NLPWorker):
def is_jsonl(
document_path: str | Path
) -> bool:
"""Validates whether text file has json/jsonl structure and has "text" keyword."""
"""Validates whether text file has json/jsonl structure."""
try:
with open(document_path, 'r', encoding="utf-8") as file:
for line in file:
......
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