OCR-D / ocrd_tesserocr

Run tesseract with the tesserocr bindings with @OCR-D's interfaces
MIT License
39 stars 11 forks source link

Catch exception when setting the locale #72

Closed stweil closed 5 years ago

stweil commented 5 years ago

Add also a comment that setting the locale is no longer needed with newer versions of Tesseract.

Signed-off-by: Stefan Weil sw@weilnetz.de

kba commented 5 years ago

Looks good, thanks. Instead of silently ignoring exception, version check would probably more robust. But if we document that we expect tesseract >= 4.1.0 to be installed in the README.md (which is woefully out-of-date...), the problem would solve itself soon.

bertsky commented 5 years ago

I concur – this is helpful already and should be merged independently.

Before we can remove the workaround and point to 4.1.0 as dependency, we must increase test coverage (especially with BlockPolygon) and verify the precise requirements.

stweil commented 5 years ago

I tried to use the version check, but with the current tesserocr the version can only be checked after the Tesseract initialization which triggers the assertion. :-(

That needs a fix in the tesserocr code.