Files
datalab-to--surya/tests/test_ocr_errors.py
T
wehub-resource-sync 925e56bb5f
Test CLI scripts / build (push) Waiting to run
Unit tests / build (t4_gpu) (push) Waiting to run
Unit tests / build (ubuntu-latest) (push) Waiting to run
Unit tests / build (windows-latest) (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:24:56 +08:00

15 lines
510 B
Python

def test_garbled_text(ocr_error_predictor):
text = """"
; dh vksj ls mifLFkr vf/koDrk % Jh vfuy dqekj
2. vfHk;qDr dh vksj ls mifLFkr vf/koDrk % Jh iznhi d
""".strip()
results = ocr_error_predictor([text])
assert results.labels[0] == "bad"
def test_good_text(ocr_error_predictor):
text = """"
There are professions more harmful than industrial design, but only a very few of them.
""".strip()
results = ocr_error_predictor([text])
assert results.labels[0] == "good"