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
NoneRelease 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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c0f56fc2c88ec1ea2461eb0610763443b9af279c5260b08a1be079c92bed5c6 |
|
MD5 | cfef79e48dc96f865deff1b89fa28aa6 |
|
BLAKE2b-256 | da23fb5e1e125f1fda3b1069960426c5b40a9c5e12fe8f73ac29244888cf110b |
Hashes for ocrd_tesserocr-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d474e372af4266ab4343570c47a448f9f68b3c002f970717663b64acabe1dbe4 |
|
MD5 | fab719d99117d974ca24e63cdf6af83e |
|
BLAKE2b-256 | 5c957f29b87ff5be4fdd149400855862840de4681b669d3fda60a2ce8bf24127 |