test(review): correct the junk-layer test comment

The high ocr_frac is driven by each segment being shorter than MIN_PAGE_CHARS
(needs_ocr), not by text quality; quality drives bad_text_layer separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-06-05 03:24:13 +02:00
co-authored by Claude Opus 4.8
parent 9ffe0645b8
commit e68096a780
+3 -2
View File
@@ -188,8 +188,9 @@ def test_classify_from_text_no_pages_routes_fast():
def test_classify_from_text_junk_layer_flags_bad_text_layer():
# Non-zero chars but low quality on every page (high ocr_frac) -> ocr +
# bad_text_layer (gated on ocr_frac, matching classify_pdf).
# Each short segment (<MIN_PAGE_CHARS) sets needs_ocr -> high ocr_frac, and
# total_chars>0 with mean_quality<MIN_TEXT_QUALITY (no-whitespace junk scores
# 0.0) -> bad_text_layer (gated on ocr_frac, matching classify_pdf).
text = "x1y2zx1y2z"
c = clf.classify_from_text(
text,