Skip to content
Snippets Groups Projects
Commit e86b736b authored by Martin's avatar Martin
Browse files

fail when transcriptions contain a newline

parent 9b537f02
No related branches found
No related tags found
No related merge requests found
Pipeline #74333 failed
......@@ -312,6 +312,10 @@ class HTRDataGenerator:
if not text or not text.strip():
continue
if "\n" in text.strip():
elem_id = res["element"]["id"]
raise ValueError(f"Newlines are not allowed in line transcriptions - {page_id} - {elem_id} - {text}")
if "zone" in res:
polygon = res["zone"]["polygon"]
elif "element" in res:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment