ocracy.backends.tesseract.adapter#
Adapter for Tesseract — image -> text+word-boxes via pytesseract.
A worked example of the adapter contract:
Normalize the input to a PIL image (
ocracy.util.to_pil).Call the engine inside
_read(lazy import ofpytesseract).Map Tesseract’s TSV-style word rows into normalized
TextBlock``s (boxes + confidence rescaled 0..100 -> 0..1) and assemble reading-order text, keeping the raw dict in ``raw=.
Classes
|
Tesseract adapter. |
- class ocracy.backends.tesseract.adapter.Adapter(config)[source]#
Bases:
BaseOcrAdapterTesseract adapter.