Tesserocr bindings
Project description
Segment region, line, recognize with tesserocr
Installation
Required ubuntu packages:
Tesseract headers (libtesseract-dev)
Some tesseract language models (tesseract-ocr-{eng,deu,frk,...} or script models (tesseract-ocr-script-{latn,frak,...})
Leptonica headers (libleptonica-dev)
pip install -r requirements pip install .
If tesserocr fails to compile with an error::
$PREFIX/include/tesseract/unicharset.h:241:10: error: ‘string’ does not name a type; did you mean ‘stdin’? static string CleanupString(const char* utf8_str) { ^~~~~~ stdin
This is due to some inconsistencies in the installed tesseract C headers (fix expected for next Ubuntu upgrade, already fixed for Debian). Replace string with std::string in $PREFIX/include/tesseract/unicharset.h:265:5: and $PREFIX/include/tesseract/unichar.h:164:10: ff.
If tesserocr fails with an error about LSTM/CUBE, you have a mismatch between tesseract header/data/pkg-config versions. apt policy libtesseract-dev lists the apt-installable versions, keep it consistent. Make sure there are no spurious pkg-config artifacts, e.g. in /usr/local/lib/pkgconfig/tesseract.pc. The same goes for language models.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ocrd_tesserocr-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2a7fd61a97bb222f2ac5a6f85b3d2ce43da843509993eef189f09b48f44027f |
|
MD5 | ad528712e13eecf578b236a7ab8457cd |
|
BLAKE2b-256 | 4d48282d1d793137f1ec30118a9a0bd48534a6a8053bc74a830b6c4eb389653f |
Hashes for ocrd_tesserocr-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64ec4e7a43ddaf199af7da8966996e260454dae4d30f79cb112149cddf5b8fd2 |
|
MD5 | e12ea0e2f580c6e152d334c470029dc2 |
|
BLAKE2b-256 | 0763e617002f9c2013f8a9ce10baeab48acffc0dff3d21ab160ee67428e08ebd |