Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process ocr_caption lines #1466

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

0dinD
Copy link

@0dinD 0dinD commented Jan 30, 2025

Previously in the hOCR transform, ocr_caption spans were ignored. This PR fixes that issue so that OCRmyPDF processes image caption lines instead of ignoring them. As far as I know, ocr_caption is the only missing line type that Tesseract can produce, see: https://github.com/tesseract-ocr/tesseract/blob/3157ff0e741ea5c85e16fbd1c6edf20f30eccbd3/src/api/hocrrenderer.cpp#L231-L248

Copy link

codecov bot commented Feb 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.16%. Comparing base (137b054) to head (b7d63f3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1466   +/-   ##
=======================================
  Coverage   90.16%   90.16%           
=======================================
  Files          95       95           
  Lines        7128     7128           
  Branches      729      729           
=======================================
  Hits         6427     6427           
  Misses        496      496           
  Partials      205      205           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant