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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eba5e7437dd145bb76af82e8f829c81d2a8dfdad36853d1a845a0f279f95ad18
|
|
| MD5 |
045032b139b5c20bf803e0002ffd73e4
|
|
| BLAKE2b-256 |
56574020fe1305459c8bb35df017b46a71c4b07d7d925b05c22170bbba60365c
|
Provenance
The following attestation bundles were made for ocrval-0.1.0.tar.gz:
Publisher:
ci.yml on pjmalandrino/ocrval
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ocrval-0.1.0.tar.gz -
Subject digest:
eba5e7437dd145bb76af82e8f829c81d2a8dfdad36853d1a845a0f279f95ad18 - Sigstore transparency entry: 1319452355
- Sigstore integration time:
-
Permalink:
pjmalandrino/ocrval@2560d508e550d6d9c33a84aac0d088fd650324a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pjmalandrino
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@2560d508e550d6d9c33a84aac0d088fd650324a1 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8af0dfb2b1b61fdafaf1537f6f035cd3d0213593b87e6e302af87db23c707c2
|
|
| MD5 |
5814e5ea716501b21559ed29d060c4d5
|
|
| BLAKE2b-256 |
7937539a6d29cf644de024d73d470c2c104f0f8f1085bb5063dfc35a5a5afb8f
|
Provenance
The following attestation bundles were made for ocrval-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on pjmalandrino/ocrval
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ocrval-0.1.0-py3-none-any.whl -
Subject digest:
e8af0dfb2b1b61fdafaf1537f6f035cd3d0213593b87e6e302af87db23c707c2 - Sigstore transparency entry: 1319452449
- Sigstore integration time:
-
Permalink:
pjmalandrino/ocrval@2560d508e550d6d9c33a84aac0d088fd650324a1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pjmalandrino
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@2560d508e550d6d9c33a84aac0d088fd650324a1 -
Trigger Event:
push
-
Statement type: