Skip to main content

OCR output quality validation — heuristic scoring pipeline for any OCR engine

Project description

ocrval

OCR output quality validation — heuristic scoring pipeline for any OCR engine.

Install

pip install ocrval

Quick start

from ocrval import validate_document, validate_text

# From Docling JSON — dictionary auto-downloaded and cached
result = validate_document(docling_json, lang="fr")

# With domain-specific words
result = validate_document(
    docling_json,
    lang="fr",
    custom_words=["bornier", "domotique"],
)

# From plain text chunks
result = validate_text(["Chunk 1 text", "Chunk 2 text"], lang="fr")

print(result.overall_score)  # 0.82
print(result.bucket)         # "good"

API demo server

pip install ocrval[api]
uvicorn ocrval.adapters.inbound.api.app:app --port 8000

License

MIT

Project details


Download files

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

Source Distribution

ocrval-0.1.0.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocrval-0.1.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file ocrval-0.1.0.tar.gz.

File metadata

  • Download URL: ocrval-0.1.0.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ocrval-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eba5e7437dd145bb76af82e8f829c81d2a8dfdad36853d1a845a0f279f95ad18
MD5 045032b139b5c20bf803e0002ffd73e4
BLAKE2b-256 56574020fe1305459c8bb35df017b46a71c4b07d7d925b05c22170bbba60365c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ocrval-0.1.0.tar.gz:

Publisher: ci.yml on pjmalandrino/ocrval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ocrval-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ocrval-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ocrval-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8af0dfb2b1b61fdafaf1537f6f035cd3d0213593b87e6e302af87db23c707c2
MD5 5814e5ea716501b21559ed29d060c4d5
BLAKE2b-256 7937539a6d29cf644de024d73d470c2c104f0f8f1085bb5063dfc35a5a5afb8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ocrval-0.1.0-py3-none-any.whl:

Publisher: ci.yml on pjmalandrino/ocrval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page