mirror of
https://github.com/docling-project/docling-eval.git
synced 2026-05-17 13:10:47 +00:00
* 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>
20 lines
437 B
Python
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
|