mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-09 13:18:24 +00:00
added three test-files for right-to-left
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
This commit is contained in:
BIN
tests/data/pdf/right_to_left_01.pdf
Normal file
BIN
tests/data/pdf/right_to_left_01.pdf
Normal file
Binary file not shown.
BIN
tests/data/pdf/right_to_left_02.pdf
Normal file
BIN
tests/data/pdf/right_to_left_02.pdf
Normal file
Binary file not shown.
BIN
tests/data/pdf/right_to_left_03.pdf
Normal file
BIN
tests/data/pdf/right_to_left_03.pdf
Normal file
Binary file not shown.
@@ -248,13 +248,14 @@ def verify_conversion_result_v1(
|
||||
doc_pred_md = doc_result.legacy_document.export_to_markdown()
|
||||
doc_pred_dt = doc_result.legacy_document.export_to_document_tokens()
|
||||
|
||||
|
||||
engine_suffix = "" if ocr_engine is None else f".{ocr_engine}"
|
||||
|
||||
|
||||
gt_subpath = input_path.parent / "groundtruth" / "docling_v1" / input_path.name
|
||||
if str(input_path.parent).endswith("pdf"):
|
||||
gt_subpath = input_path.parent.parent / "groundtruth" / "docling_v1" / input_path.name
|
||||
|
||||
gt_subpath = (
|
||||
input_path.parent.parent / "groundtruth" / "docling_v1" / input_path.name
|
||||
)
|
||||
|
||||
pages_path = gt_subpath.with_suffix(f"{engine_suffix}.pages.json")
|
||||
json_path = gt_subpath.with_suffix(f"{engine_suffix}.json")
|
||||
md_path = gt_subpath.with_suffix(f"{engine_suffix}.md")
|
||||
@@ -333,8 +334,10 @@ def verify_conversion_result_v2(
|
||||
|
||||
gt_subpath = input_path.parent / "groundtruth" / "docling_v2" / input_path.name
|
||||
if str(input_path.parent).endswith("pdf"):
|
||||
gt_subpath = input_path.parent.parent / "groundtruth" / "docling_v2" / input_path.name
|
||||
|
||||
gt_subpath = (
|
||||
input_path.parent.parent / "groundtruth" / "docling_v2" / input_path.name
|
||||
)
|
||||
|
||||
pages_path = gt_subpath.with_suffix(f"{engine_suffix}.pages.json")
|
||||
json_path = gt_subpath.with_suffix(f"{engine_suffix}.json")
|
||||
md_path = gt_subpath.with_suffix(f"{engine_suffix}.md")
|
||||
|
||||
Reference in New Issue
Block a user