Skip to main content

Provides an API layer over HOCR data format

Project description


Hocron provides an API over HOCR file format.


pip install hocron

Prepare Development Environment & Run Tests

  1. virtualenv .venv -p /usr/bin/python3.8 # provide virtualenv path to 3.8 interpreter
  2. source .venv/bin/activate # activate .venv virtual environment
  3. pip install -r requirements.txt # install dependencies
  4. python develop # provide a link to dev version of hocron
  5. python test/



from hocron import Hocron, LinePattern

# define a line pattern
line_pattern = LinePattern([

hocron_inst = Hocron(hocr_as_str)

value = hocron_inst.get_labeled_value(line_pattern)

Hocron class receives as argument a string. It expects that string to in a valid hOCR format.


hOCR is an open standard of data representation for formatted text obtained from optical character recognition (OCR).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hocron, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size hocron-0.5.0.tar.gz (18.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page