Repository navigation
New hOCR renderer - testing and feedback requested #1194
jbarlow83
announced in
Announcements
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I rewrote the hocr renderer, essentially by copying what Tesseract does in the sandwich renderer (Tesseract's PDF generator) and fixing its issues.
I am intending to make this renderer the default, with sandwich as a fallback. I'd appreciate testing and feedback since this affects everything OCRmyPDF outputs.
It is in the feature/modernhocr branch.
git clone --branch feature/modernhocr https://github.com/ocrmypdf/OCRmyPDF.gitI believe I have solved/improved:
The cost is:
Asian language characters still have problems with extra word breaks. The hOCR output from Tesseract separates words differently.
For example, in one test document in #715, the characters in the first bullet
进入新发展阶段
have no spaces, but Tesseract reports them as
进入 / 新 / 发 / 展 / 阶段 where each / is an explicit word break. Is there any consistent way to determine where spaces between glyphs are expected in Asian languages?
Some of the new code ought to be in pikepdf and will be migrated there eventually.
All reactions