Files
docling-eval/tests/test_ocr_evaluator.py
be62102fe0 feat: OCR evaluator (#63)
* Add README for Docling-DPBench

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Pick ocr_evaluator, create basic test unit

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Add basic OCR evaluator test unit

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* fix: update ocr evaluator

* fix ocr tests

* address review comments

* remove unused imports from OCR test files

* Remove unnecessary hasattr checks

* Add back test depdendency for OCR

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

---------

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Signed-off-by: samiuc <sami.ullah.chat@gmail.com>
Co-authored-by: samiuc <sami.ullah.chat@gmail.com>
Co-authored-by: samiullahchattha <Sami.Ullah1@ibm.com>
2025-04-22 15:58:00 +02:00

20 lines
437 B
Python

from pathlib import Path
import pytest
from docling_eval.evaluators.ocr_evaluator import OCREvaluator
@pytest.mark.dependency(
depends=["tests/test_dataset_builder.py::test_run_dpbench_e2e"],
scope="session",
)
def test_ocr_evaluator():
r""" """
test_dataset_dir = Path("scratch/DPBench/eval_dataset_e2e")
# Default evaluator
eval1 = OCREvaluator()
v1 = eval1(test_dataset_dir)
assert v1 is not None