update leptonica, tesseract, and libk2pdfopt #1800
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depend on koreader/libk2pdfopt#49.
Thanks to some upstream cleanups in tesseract, the resulting code size (bss+data+text) is reduced by ~1.4-2.3 MB.
Note: tesseract is compiled with legacy engine support, which means the resulting mode after initialization will depend on the type of language data available:
Integer
models): run the LSTM line recognizer only.Float
models): same mode as above.AFAIK, there are no legacy only language files.
I tested both modes, English only with
tessdata
&tessdata-fast
, and it did not seem to make a difference (which might just mean that the fallback on legacy was never triggered). Disabling the legacy engine would save an additional ~500 KB. But I don't know if the new engine is (always) better, especially for other languages.The version used by Linux distributions seem to vary: for example Arch Linux is using the English
tessdata
variant, while Ubuntu usestessdata-fast
. ¯\(ツ)/¯This change is