COMPONENT 01 / PUBLIC · v0.1.2
Legal OCR Pipeline
A command-line OCR application. A reusable system component.
It converts scanned and image-based PDFs into ordered text using Google Vertex AI. Use it on its own or adapt it for a larger document workflow.
- Status
- PUBLIC
- Version
- 0.1.2
- Licence
- APACHE-2.0
- Verified
- 2026-08-22
- 01
AI-native recognition
Printed text, stamps and handwriting.
- 02
Deterministic controls
Page order, validation, retries and checkpoints.
- 03
Human verification
Offline source-and-transcript review.
- 04
Standalone or embedded
Standalone command-line use; adaptable for integration into other systems.
01 / CAPABILITIES
AI recognition inside a controlled pipeline.
The model performs probabilistic visual recognition. The pipeline defines rendering, page identification and order, validation of page identifiers and response completeness, retries, and the saving of checkpoints and final output. These steps are inspectable, but this does not guarantee identical transcripts across runs. The accepted campaign used one difficult legal filing. The architecture is reusable across image-document workflows, but no cross-domain performance benchmark is claimed.
- 01PDF
- 02Page render
- 03Multimodal AI
- 04Validation
- 05Checkpoint
- 06Ordered artefacts
- 07Human review
INPUT
Documents that need visual reading.
- Image-based and scanned PDFs
- Page images with printed and graphic text, stamps or handwriting
- One PDF per run; at most 180 pages in the current configuration
OUTPUT
Artefacts that can travel through a larger system.
- Ordered
ocr.txtdocument output - Page checkpoints and a machine-readable
metrics.jsonrecord - Campaign metrics and review-ready source/transcript pairs
STANDALONE USE + INTEGRATION PATTERNS
- 01Standalone command-line application
- 02Document processing is included in Engine 0.1.0
- 03Standalone release and Engine have separate records
- 04Possible integration with a custom document workflow
02 / CONTROLLED PROCESS
The model reads.The pipeline controls.
The model recognises text; the pipeline controls processing and preserves intermediate results. Automated checks do not establish transcription accuracy: the transcript must still be checked against the source.
- 01
Render
The pipeline converts the PDF into page-identified JPEG images at a controlled resolution and quality.
- 02
Recognise
It sends each page to a multimodal AI model for recognition of printed and graphic text, stamps and handwriting.
- 03
Validate
It checks page identity and the terminal control marker before accepting the response.
- 04
Checkpoint
It saves completed pages so processing can resume. Pages whose responses have already passed automated validation do not need to be sent to the provider again.
- 05
Assemble
It writes the combined text in document order only after every page succeeds. Checkpoints and machine-readable metrics are retained.
- 06
Review
A person compares source pages with their transcripts locally using the public offline review tool. Keep the generated review package private.
03 / HUMAN VERIFICATION
Review stays beside the source.
The repository's public offline review tool displayed each original page beside its OCR transcript. The generated review package remained private, and review ran locally with no network or provider calls.
- 01
Deterministic sample
A mandatory sample combines fixed controls, no-text pages, edge cases and pseudo-random pages. Its exact page list is public in the canonical source record.
- 02
Offline review
Review runs locally without network or provider calls. Source pages, OCR output and generated review artefacts remain private.
- 03
Explicit classification
Every reviewed page is classified as PASS, MINOR, ISSUE or UNCERTAIN; the aggregate status is recorded separately.
RECORDED ACCEPTANCE
How the result became evidence.
The result must be read together with the document scope, execution record, reproducible sample selection, human review and stated limitations.
INPUT BOUNDARY
One private source, fixed rendering.
One 174-page filing was rendered at 150 DPI as JPEG · quality 95. The source and generated acceptance artefacts remain private.
EXECUTION RECORD
The complete CLI path was measured.
174 page calls used Gemini 3.5 Flash-Lite on Google Vertex AI, with up to 16 concurrent page tasks. The record shows 0 retries and 0 failed pages.
REVIEW RULE
The sample was selected deterministically.
The mandatory 40-page sample combined fixed boundary and known-interest pages, all no-text pages, length extremes, illegible markers and a fixed-seed selection.
CLAIM BOUNDARY
The record stops where the evidence stops.
SAMPLE_PASS records one bounded campaign. It is not a universal accuracy claim, character- or word-error rate, or service-level promise.
PUBLIC RECORD
Method · configuration · sample rule · aggregate result
PRIVATE MATERIAL
Source filing · OCR output · metrics and review artefacts
04 / BOUNDARIES + NEXT GATES
Where the evidence stops.
The acceptance supports one working path on one difficult filing. It does not turn model output into an authoritative legal source or a universal performance promise.
- 01
This is one concrete 174-page legal filing and one acceptance run.
- 02
The timing is not an average of repeated runs and is not a guarantee for other documents.
- 03
The review result is SAMPLE_PASS, not FULL_PASS: 40 of 174 pages were manually reviewed.
- 04
OCR is not an authoritative legal source. Critical names, dates, amounts, deadlines, quotations and operative text must be checked against the source document.
- 05
The current fixed 180-call campaign cap means one new run cannot accept more than 180 pages without changing the configuration.
- 06
Document pages are sent to Google Vertex AI. The component makes no independent data-residency, confidentiality, regulatory-compliance or provider-retention guarantee.
- 07
The publicly released package produces ordered plain text with marked page boundaries and separate checkpoints. It does not preserve complete page layout or extract structured legal facts.
- 08
The package does not provide a hosted service, packaged library API, container image, graphical application or dedicated Open WebUI connector.
READINESS + ROADMAP
Published release. Further accuracy and speed evaluation.
Later work remains gated by measured quality. A faster provider path is not adopted until it preserves the required recognition reliability.
- 01
PUBLIC BASELINE
v0.1.2 is published under APACHE-2.0.
The public repository includes the component code, documentation, tests, offline review tooling, security policy and canonical acceptance record.
- 02
ACCURACY
Broaden the evaluation corpus.
Add difficult layouts, handwriting, stamps and multiple document families while keeping review outcomes and error classes explicit.
- 03
LATENCY
Measure and optimise every stage.
Separate render, provider, validation, checkpoint and artefact-write latency before making further public speed claims.
- 04EXPERIMENTAL / QUALITY GATE NOT MET
PORTABILITY
Evaluate additional model paths.
An experimental Cerebras path has already been tested and demonstrated a substantial latency advantage, but it did not meet the required OCR reliability threshold. It is not part of v0.1.2 and will be re-evaluated as stronger models become available.
05 / RELEASE RECORD
A public building block with explicit boundaries.
Version 0.1.2 is public and useful by itself or embeddable inside larger systems. The software package is open; the confidential acceptance source and generated campaign artefacts remain outside the public repository.
RELEASE IDENTITY
Source, status and accountability.
- Component
- Legal OCR Pipeline
- Version
- 0.1.2
- Status
- PUBLIC
- Licence
- APACHE-2.0 ↗
- Notice
- ATTRIBUTION NOTICE ↗
- Repository
- GITHUB / PUBLIC ↗
- Acceptance record
- RECORDED ACCEPTANCE ↗
- Security
- POLICY ↗ · PRIVATE REPORTING ↗ · PROJECT CHANNEL →
- Latest update
- COMPONENT UPDATE →
RUNTIME + OUTPUTS
What the package operates.
- Runtime
- PYTHON 3.10+ · POPPLER · VERTEX AI / ADC
- Command
python vertex_parallel_pdf_ocr.py input.pdf output-directory- Outputs
checkpoints/·metrics.json·ocr.txt- Public package
- CODE · DOCUMENTATION · TESTS · OFFLINE REVIEW TOOLING
EXCLUSIONS + PRIVATE BOUNDARIES
What remains outside.
- Service boundary
- NOT INCLUDED: HOSTED SERVICE · LIBRARY API · CONTAINER IMAGE · GRAPHICAL APPLICATION · DEDICATED OPEN WEBUI CONNECTOR
- Data flow
- DOCUMENT PAGES ARE SENT TO GOOGLE VERTEX AI
- Private boundary
- SOURCE FILING · OCR OUTPUT · METRICS · REVIEW ARTEFACTS · CREDENTIALS
- Brand rights
- SEPARATE FROM THE CODE LICENCE