feat: surface raw Tesseract diacritics message at debug level
When Tesseract reports a page with many diacritics, OCRmyPDF rewrites the message to "lots of diacritics - possibly poor OCR", which hid the original wording. Keep the interpreted hint but also emit Tesseract's raw line at debug verbosity (-v 1) so users can see exactly what Tesseract reported. Closes #1566.
This commit is contained in:
@@ -297,6 +297,10 @@ def tesseract_log_output(stream: bytes) -> None:
|
||||
continue
|
||||
elif 'diacritics' in line:
|
||||
tlog.warning("lots of diacritics - possibly poor OCR")
|
||||
# Surface the raw Tesseract message at debug level so users can see
|
||||
# exactly what Tesseract reported (e.g. the affected count) without
|
||||
# losing the interpreted hint above (#1566).
|
||||
tlog.debug(line.strip())
|
||||
elif line.startswith('OSD: Weak margin'):
|
||||
tlog.warning("unsure about page orientation")
|
||||
elif 'Error in pixScanForForeground' in line:
|
||||
|
||||
Reference in New Issue
Block a user