- Category: C. AI Engineering & LLM Ops
- English term: Optical Character Recognition (OCR)
- Related: Information Extraction with LLM · Pipes and Filters Pattern (Pipeline Architecture) · Work Queue (Producer-Consumer Pattern) · Inference Offloading · Automatic Speech Recognition (ASR / Whisper)
General Meaning
Public institutions, regulatory bodies, and enterprises frequently distribute vital information as scanned paper PDFs or promotional flyers. These rasterized documents contain no underlying electronic text layer, rendering standard web scrapers and search indexing engines incapable of reading their contents.
Optical Character Recognition (OCR) analyzes the visual contours of characters within images and translates them into standard character encodings. Advances in deep learning and vision-language architectures have substantially improved recognition accuracy for complex multi-column layouts, mixed-language tables, and printed forms.
Why It Matters
- Unlocking non-text public archives: Converts scanned administrative announcements and rate charts without text layers into queryable digital data.
- Expanding collection completeness: Extends information gathering beyond surface HTML pages into deep PDF attachments and flyer graphics.
- Automating manual transcription: Eliminates human labor spent reading scans and manually typing numbers into database spreadsheets.
How the Site Factory Uses It
The Site Factory implements a fast, fully local OCR pipeline taking advantage of native macOS frameworks. The tools are written in Swift using Apple Vision and PDFKit (pdftext.swift and romu_ocr.swift). To preserve scraper throughput, routine collection (engine/collect.py) sets --ocr never, tagging scanned documents as lacking text layers to defer OCR for dedicated queues.
Because OCR workloads impose heavy CPU and GPU burdens, they are isolated from regular web harvesting and processed individually via the heavy lane in mini-queue. A key operational use case is parsing labor unit rate tables from official Ministry of Land, Infrastructure, Transport and Tourism (MLIT) scanned PDF bulletins (scripts/romu_ocr.swift). Extracted numbers undergo deterministic audits against original imagery before publication.
Caveats & Operational Rules
- Fragility in table structures: OCR readily misinterprets columnar alignments and grid borders, requiring geometric coordinate parsing and independent sanity verification for tabular figures.
- Avoid indiscriminate mass OCR: Running continuous OCR across arbitrary PDF collections monopolizes system compute; the Site Factory checks for existing text layers first and invokes OCR only when required.
Related Terms
- Information Extraction with LLM
- Pipes and Filters Pattern (Pipeline Architecture)
- Work Queue (Producer-Consumer Pattern)
- Inference Offloading
- Automatic Speech Recognition (ASR / Whisper)
References
- Book: Richard Szeliski, *Computer Vision: Algorithms and Applications*, Chapter 14 (Recognition and Optical Flow)
Verified: 2026-11-08