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
Metadata
Release files for ocrval 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ocrval-0.1.0.tar.gz | 33.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ocrval-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.1 kB
Release files / ocrval-0.1.0.tar.gz
| Download URL | ocrval-0.1.0.tar.gz |
|---|---|
| Size | 33.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eba5e7437dd145bb76af82e8f829c81d2a8dfdad36853d1a845a0f279f95ad18
|
|
BLAKE2b-256 checksum How to use checksums |
56574020fe1305459c8bb35df017b46a71c4b07d7d925b05c22170bbba60365c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logRelease files / ocrval-0.1.0-py3-none-any.whl
| Download URL | ocrval-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8af0dfb2b1b61fdafaf1537f6f035cd3d0213593b87e6e302af87db23c707c2
|
|
BLAKE2b-256 checksum How to use checksums |
7937539a6d29cf644de024d73d470c2c104f0f8f1085bb5063dfc35a5a5afb8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency log