Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: relicensed proprietary, D-103

oq-ai-ocr

Document ingestion and optical character recognition (OCR, reading text off a picture), by OrbitQube. It is everything around the recognition engine and not the engine itself: byte-level format detection, text-layer-before-OCR reading, the format readers, an escalation policy that decides when a model is worth calling, and an eval harness that settles every threshold with a measurement rather than an argument.

This is the Python implementation. A TypeScript one answers the same contract, so a result crosses between them unchanged.

AGPL-3.0-or-later.

Install

The core installs with no recognition engine and no model client at all, which is what lets a consumer prove no model is even present. Extras pull the engine and the document readers:

pip install "oq-ai-ocr[rapidocr,documents]"
  • rapidocr adds PP-OCR on ONNX Runtime, for reading scans.
  • documents adds the PDF, Word, PowerPoint, Excel and image readers.
  • server adds an optional HTTP surface.

Use

from oq_ai_ocr import extract

result = extract(data, filename="statement.pdf")
print(result.text)       # the whole document in reading order
print(result.engine)     # which engine read it, exactly
print(result.warnings)   # coded, one per thing that degraded the reading

What it does, and does not

  • Reads a document's own text first, and recognises pictures only when there is no usable text.
  • Runs locally. No document is sent anywhere. Recognition models download once and cache.
  • Never raises for a document problem. An unreadable page, an unavailable engine, a corrupt zip and a timeout come back as a degraded result carrying warnings, so one bad page does not lose the rest. It raises only for a programming problem.
  • Says what it did. Every result names the engine that read it, marks each page as text-layer or recognised, and carries a coded warning for everything that degraded the reading.
  • No threshold is a guess. Every number that decides behaviour comes from a run of the eval harness and names the run it came from.

Reading order can be wrong

Recognised text is never perfect. Check a figure that matters before you trust it.

Release files for oq-ai-ocr 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oq-ai-ocr 0.2.0
File Size Uploaded
oq_ai_ocr-0.2.0.tar.gz 52.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oq-ai-ocr 0.2.0
File Interpreter ABI Platform
oq_ai_ocr-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 100.3 kB

Release files / oq_ai_ocr-0.2.0.tar.gz

Download URL oq_ai_ocr-0.2.0.tar.gz
Size 52.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2e4fbcc0b1e0c4d3a84a35bab7fb9034291c9f78226816a8d49e03095a08ca6a
BLAKE2b-256 checksum
How to use checksums
f06029ff1d19fc370c293f87d0532f15f2765df7ecc245cc62d05f4976cba75a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / oq_ai_ocr-0.2.0-py3-none-any.whl

Download URL oq_ai_ocr-0.2.0-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf241db5466c082f2c4cd1f63537dc8ea05aaaeaca6e8febfa245fb857a8a294
BLAKE2b-256 checksum
How to use checksums
236f6e89c46ebded4ce14d3821caa8892041aea2b0f65b19351d19fa146f324f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page