Download ocr-tech/docs/LIMBU_FIRST_OCR_PIPELINE.md from prosperious/ocr-projects-archive: direct link, hf CLI and curl.
- Browser
- Download file 130 kB
-
https://huggingface.co/prosperious/ocr-projects-archive/resolve/main/ocr-tech/docs/LIMBU_FIRST_OCR_PIPELINE.md
- Command line
-
hf download hf://prosperious/ocr-projects-archive/ocr-tech/docs/LIMBU_FIRST_OCR_PIPELINE.md
-
curl -L -o LIMBU_FIRST_OCR_PIPELINE.md https://huggingface.co/prosperious/ocr-projects-archive/resolve/main/ocr-tech/docs/LIMBU_FIRST_OCR_PIPELINE.md
Limbu-First OCR Pipeline
Updated: 2026-06-22
Goal
Build the operational OCR path for Limbu pages before expanding the claim: imperfect
still-page captures should be cleaned and parsed through a pipeline that can handle
both Devanagari-written Limbu and Sirijonga-script Limbu, preserve line provenance,
route or flag script-specific recognition risk, and emit review/audit artifacts for
every page. The product boundary is a robust two-script Limbu OCR pipeline; any
moving-camera workflow must first provide still page images to this pipeline and is
not a separate video-to-page objective. This is a production digitization goal, not a
CER claim by itself; claim-grade accuracy still requires frozen references and
run_page_ocr_eval.py.
One-line objective prompt:
Build a best-in-class, claim-audited Limbu OCR pipeline for real page images that understands both Devanagari-written Limbu and Sirijonga-script Limbu, with script-aware detection/recognition, page cleanup, language-specific correction, confidence review queues, and frozen page-level eval before any quality claim.
Current Entry Point
Check that the packaged mixed-script router can run on the machine:
uv run ocrtech preflight-limbu-pipeline \
--model-config outputs/limbu-first-router-v1/model-card.json \
--out outputs/limbu-first-router-v1/runtime-preflight
For operational two-script readiness, use the stricter component-admission gate:
uv run ocrtech preflight-limbu-pipeline \
--model-config outputs/limbu-first-router-v1/model-card.json \
--out outputs/limbu-first-router-v1/runtime-preflight-strict \
--require-validated-components \
--required-component-role devanagari_primary \
--required-component-role sirijonga_secondary
The loose preflight only answers whether the runtime and model-card wiring are usable.
The strict preflight is the one that must pass before calling the mixed-script router
ready: both the Devanagari primary and Sirijonga secondary must be recorded in
provenance.component_admission with validated or admitted status. The JSON and
Markdown reports record the enforced policy, including required Tesseract languages,
strict component mode, and required component roles; malformed component-admission
entries fail instead of disappearing from the audit.
Preserve and normalize the capture first:
uv run ocrtech prepare-limbu-capture path/to/raw-page.jpg --out outputs/limbu-page-prep \
--auto-detect-page \
--auto-deskew \
--rotate-degrees -1.5 \
--crop-box 40,80,1900,2840
For difficult pages, manual corners can still override automatic detection:
uv run ocrtech prepare-limbu-capture path/to/raw-page.jpg --out outputs/limbu-page-prep \
--crop-box 40,80,1900,2840 \
--perspective-quad 30,40,1780,20,1810,2600,60,2630 \
--auto-deskew
Audit the prepared capture bundle before OCR:
uv run ocrtech audit-limbu-capture outputs/limbu-page-prep \
--require-metadata-path-self
For multi-page books or a batch of still frames, put the page images in a directory and run the book OCR runner directly. It scans supported image files in natural filename order, generates the raw page manifest with image hashes, prepares every page, writes the prepared OCR manifest, parses the book in preserve-line mode, writes aggregate editable text and review queues, and runs the book artifact audit. This is the default operator command for real photographed pages:
PYTHONPATH=src /tmp/ocrtech-paddle311/bin/python tools/run_limbu_book_ocr.py \
--image-dir path/to/page-images \
--out outputs/limbu-book-ocr-run \
--page-id-prefix limbu-book-p \
--auto-deskew \
--max-auto-deskew-degrees 8 \
--min-prepared-width 1000 \
--min-prepared-height 1000 \
--min-prepared-entropy 0.5 \
--min-prepared-luminance-stddev 1.0 \
--min-prepared-edge-stddev 1.0
If the folder contains non-target pages, covers, duplicate captures, or an exported source pack with mixed language candidates, filter it before OCR:
PYTHONPATH=src /tmp/ocrtech-paddle311/bin/python tools/run_limbu_book_ocr.py \
--image-dir path/to/page-images \
--out outputs/limbu-book-ocr-run \
--page-id-prefix limbu-book-p \
--include-filename-regex '.*-01\.png$' \
--skip-duplicate-images \
--auto-deskew
--include-filename-regex keeps only filenames matching the regex,
--exclude-filename-regex drops known non-target filenames, and
--skip-duplicate-images skips later files with the same SHA-256 content as an earlier
kept image. The generated manifest summary records discovered, skipped, duplicate, and
kept images so a mixed folder cannot silently masquerade as a clean Limbu book. The
manifest builder and runner also emit source attention flags: source_images_skipped,
duplicate_source_images_removed, or duplicate_source_images_present.
The key outputs are:
raw-page-manifest/book-pages.jsonl: generated page manifest with source image hashes.capture-prep/prepared-page-manifest.jsonl: prepared-image manifest with bound capture metadata.capture-prep/capture-prep-dashboard.html: raw/prepared page contact sheet for checking crop, deskew, perspective, and prepared-image quality before OCR review.book-ocr/book.mdandbook-ocr/book.body.md: editable full/body book text.book-ocr/book-line-review-queue.tsv: review sheet for weak or unresolved lines, including source crop paths and SHA-256s.book-ocr/book-review-dashboard.html: crop-linked contact sheet for the book-line review queue.layout-gap-review/layout-gap-review-queue.tsv: crop-linked review rows for suspicious vertical gaps between detected text rows, including a full-page context image path/hash with the gap band highlighted.layout-gap-review/layout-gap-review-dashboard.html: contact sheet for the suspicious gap crop bands and their page context.limbu-book-ocr-run.json: run summary with counts, hashes, audit result, per-page line/script/review counts, and operator attention flags.README.md: operator summary, including source image discovery/skip/duplicate counts when--image-diris used.
Source attention flags are ingestion triage signals. duplicate_source_images_present
means the run kept duplicate image content and should not be treated as a clean book
batch until the manifest is filtered or rerun with --skip-duplicate-images.
Operator attention flags are triage signals, not quality metrics. They mark pages with
zero detected lines, all or many lines in review, high other script share, suspicious
line-geometry gaps (possible_missed_line_gap), unavailable line geometry, or failed
page artifact audit so the next human action is obvious: inspect the page, reshoot or
recrop if needed, then work through the crop-bound review queue. The geometry-gap flag
is computed from final document.json line boxes and catches unusually large vertical
holes between detected rows even when confidence/script counts otherwise look healthy;
structural page-marker footers are ignored so ordinary bottom page numbers do not trip
the warning. Each suspicious gap also gets a crop-bound pending row in
layout-gap-review/layout-gap-review-queue.tsv, so an operator can inspect the actual
page band and the highlighted full-page context before deciding whether a missing line
needs to be inserted.
If page order needs manual correction or a page needs per-page crop/perspective
settings, build or edit the raw manifest first. Each row needs page_id and
image_path; optional per-page capture_kwargs can override rotation, crop,
perspective, and deskew settings for difficult pages.
uv run python tools/build_limbu_book_page_manifest.py \
--image-dir path/to/page-images \
--out outputs/limbu-book-pages.jsonl \
--page-id-prefix limbu-book-p \
--include-filename-regex '.*-01\.png$' \
--skip-duplicate-images
Then run the same OCR runner on that manifest:
PYTHONPATH=src /tmp/ocrtech-paddle311/bin/python tools/run_limbu_book_ocr.py \
--page-manifest outputs/limbu-book-pages.jsonl \
--out outputs/limbu-book-ocr-run \
--auto-deskew
The lower-level capture/parse split is still available for debugging. First prepare the raw manifest:
uv run python tools/prepare_limbu_book_captures.py \
--page-manifest path/to/raw-book-pages.jsonl \
--out outputs/limbu-book-capture-prep \
--auto-deskew \
--max-auto-deskew-degrees 8
Then run the book parser on the generated manifest. Preserve detected lines, bind capture provenance, and send weak rows to review instead of deleting them with confidence filters:
PYTHONPATH=src /tmp/ocrtech-paddle311/bin/python tools/parse_limbu_book_pages.py \
--page-manifest outputs/limbu-book-capture-prep/prepared-page-manifest.jsonl \
--out outputs/limbu-book-ocr-preserve \
--engine candidate \
--model-config outputs/limbu-router-v4-ppocr-devanagari-sirijonga-confidence-guard-2026-06-22/model-card.json
Then run parse-limbu-doc on the prepared image:
uv run ocrtech parse-limbu-doc outputs/limbu-page-prep/prepared/raw-page.prepared.png \
--out outputs/limbu-page-run \
--engine candidate \
--model-config outputs/limbu-first-router-v1/model-card.json \
--capture-prep-metadata outputs/limbu-page-prep/limbu-capture-prep.json \
--post-correction-profile path/to/limbu-post-correction-profile.json \
--low-confidence-threshold 0.80 \
--sirijonga-low-confidence-threshold 0.85 \
--devanagari-low-confidence-threshold 0.80 \
--script-ratio-threshold 0.20
When --capture-prep-metadata is supplied, parse-limbu-doc reruns the capture audit
into capture-prep-audit/, fails if the prepared/raw bundle is stale or incomplete, and
fails if the OCR input path does not match the audited prepared_image_path.
Later, audit-limbu-output reruns that capture audit from the embedded metadata path
into capture-prep-replay-audit/, so a prepared image tampered after OCR cannot keep
passing on the stale bundled audit. Strict output audits can also pass prepared-image
quality thresholds through to that replay with --min-capture-prepared-width,
--min-capture-prepared-height, --min-capture-prepared-entropy,
--min-capture-prepared-luminance-stddev, and
--min-capture-prepared-edge-stddev, plus
--require-capture-metadata-path-self when the final OCR output audit must enforce the
same metadata self-binding as the capture audit. Use
audit-limbu-capture --require-metadata-path-self for claim-grade capture bundles so
the recorded metadata_path must resolve to the exact limbu-capture-prep.json being
audited, instead of merely warning after a copied or renamed metadata file.
Audit the OCR output bundle before review or eval:
uv run ocrtech audit-limbu-output outputs/limbu-page-run
Audit any automatic correction profile before using it:
uv run ocrtech audit-limbu-post-correction-profile \
path/to/limbu-post-correction-profile.json \
--out outputs/limbu-post-correction-profile-audit
For dry runs with sidecar OCR fixtures:
uv run ocrtech parse-limbu-doc path/to/page.png --out outputs/limbu-sidecar-smoke --engine sidecar
For book-shaped runs, put the page images in reading order in a JSONL manifest and run the multi-page wrapper:
{"page_id":"book-p001","image_path":"pages/page-001.png","parse_kwargs":{"line_detection_mode":"image-line"}}
{"page_id":"book-p002","image_path":"pages/page-002.png","parse_kwargs":{"line_detection_mode":"image-line"}}
uv run python tools/parse_limbu_book_pages.py \
--page-manifest path/to/book-pages.jsonl \
--out outputs/limbu-book-run \
--engine candidate \
--model-config outputs/limbu-first-router-v1/model-card.json
The wrapper is intentionally thin: each page still goes through parse-limbu-doc /
parse_limbu_document, and the book layer only aggregates per-page bundles into
book.md, book.body.md, book-review-queue.tsv, book-run.json, and a
score-documents/ projection compatible with tools/run_page_ocr_eval.py. Manifest
rows must provide page_id or sample_id or id, plus image_path or source_path;
the optional parse_kwargs object is restricted to known page-parser settings so a
book run cannot smuggle in unsupported behavior. Use this for multi-page digitization,
then score with frozen references before making any quality claim.
For the current Devanagari Limbu book path, add --line-assembly to produce the
measured source-break line-structure projection:
uv run python tools/parse_limbu_book_pages.py \
--page-manifest path/to/book-pages.jsonl \
--out outputs/limbu-book-run \
--engine candidate \
--model-config outputs/limbu-first-router-v1/model-card.json \
--line-assembly
This does not rewrite the audited per-page OCR bundles. It writes separate
line-assembly-source-documents/ and line-assembled-documents/ directories, audits
the assembled documents by replay, and points book.md, book.body.md, and
score-documents/ at that book-level projection. It also writes
book-line-review-queue.tsv, which is the review sheet to use when checking assembled
book text: each row names the editable book line, whether it was assembled, the source
line ids, the source review rows that triggered review, and the assembled text with
internal newlines escaped as \n. Keep book-review-queue.tsv as the source-page
correction input for existing review-application tooling.
After editing book-line-review-queue.tsv, apply accepted book-line corrections to a
new editable projection:
uv run python tools/apply_limbu_book_line_reviews.py \
outputs/limbu-book-run \
--out outputs/limbu-book-run-corrected
Accepted rows are statuses such as accepted, corrected, verified, or done with
non-empty corrected_text. The tool writes corrected book.md, book.body.md,
book-documents/, score-documents/, book-line-correction-audit.json, and
book-line-correction-pairs.jsonl. It applies corrections to the assembled book-line
projection and records source line ids. For current review queues, actionable rows must
also keep valid source_crop_paths and source_crop_sha256s; stale or tampered crop
references are rejected before any corrected book projection is written. It does not try
to split an assembled-line correction back into the original page OCR fragments.
If both book-line-review-queue.tsv and
layout-gap-review/layout-gap-review-queue.tsv have been reviewed, apply both in the
correct order with one command:
uv run python tools/apply_limbu_book_review_queues.py \
outputs/limbu-book-run \
--out outputs/limbu-book-run-reviewed
The wrapper applies book-line corrections first, then accepted layout-gap insertions,
and writes the final reviewed projection under final-book/. It records the source
hashes, intermediate application reports, the final book-run.json, and a layout-gap
application consistency audit. It also writes a top-level README.md pointing at the
final editable text, final book-run.json, and consistency audit. This is the
preferred operator command once both review queues have been edited.
After editing layout-gap-review/layout-gap-review-queue.tsv, apply accepted
missed-line insertions to a new editable projection:
uv run python tools/apply_limbu_book_layout_gap_reviews.py \
outputs/limbu-book-run \
--out outputs/limbu-book-run-gap-corrected
Accepted layout-gap rows require an accepted/corrected/verified-style status,
non-empty corrected_text, and valid crop_path / crop_sha256. The applicator
inserts a new reviewed line at the gap geometry, writes chainable corrected book.md,
book.body.md, book-documents/, score-documents/, book-run.json, and
layout-gap-review-application-audit.json, and rejects stale or tampered crop hashes
before writing the corrected projection.
Audit the layout-gap application output:
uv run python tools/audit_limbu_book_layout_gap_review_application.py \
outputs/limbu-book-run-gap-corrected
Audit the whole book bundle after the run:
uv run python tools/audit_limbu_book_output.py outputs/limbu-book-run
This writes limbu-book-output-audit.json and .md for the raw OCR book bundle. It checks the book manifest,
aggregate markdown, both review queues, score-document projection, per-page output
audits, and line-assembly replay audit when assembly is enabled. It is an artifact
consistency audit, not an OCR-quality claim.
To replay already-materialized page OCR documents through the book wrapper, prepare sidecar inputs first:
uv run python tools/prepare_limbu_book_sidecar_replay.py \
--eval-manifest path/to/eval.jsonl \
--documents-dir path/to/page-document-outputs \
--out outputs/limbu-book-replay-inputs
This is useful for verifying book packaging and scorer compatibility against selected diagnostic outputs. It is not fresh OCR inference; the replay summary records the source document hashes.
After review, apply accepted corrections back to the parsed document:
uv run ocrtech apply-limbu-review-corrections \
--document outputs/limbu-page-run/document.json \
--review-queue outputs/limbu-page-run/limbu-review-queue.tsv \
--out outputs/limbu-page-corrected
Freeze accepted correction pairs into deterministic train/heldout material before deriving or admitting a profile:
uv run ocrtech build-limbu-correction-pair-pack \
outputs/limbu-page-corrected/limbu-correction-pairs.jsonl \
--out outputs/limbu-correction-pair-pack-v1 \
--pack-id limbu-corrections-v1 \
--heldout-fraction 0.20
Correction-pair rows are script-class constrained before they can become training or
held-out scoring substrate. Accepted review rows, pack building, pack audit, profile
derivation, and held-out scoring all reject unsupported script_class values outside
limbu_sirijonga, devanagari_limbu, mixed_limbu_devanagari, or other. Missing
row values are inferred from the clean text; misspelled explicit values are not
silently normalized.
Audit the frozen correction-pair pack before deriving or scoring from it:
uv run ocrtech audit-limbu-correction-pair-pack \
outputs/limbu-correction-pair-pack-v1 \
--out outputs/limbu-correction-pair-pack-v1/audit
The train split can seed an experimental deterministic profile:
uv run ocrtech derive-limbu-post-correction-profile \
outputs/limbu-correction-pair-pack-v1/train-limbu-correction-pairs.jsonl \
--out outputs/limbu-post-correction-profile-derived \
--profile-id limbu-derived-post-correction-profile-v1 \
--min-support 2
Score the profile on a separate held-out correction-pair pack before claiming validated automatic correction:
uv run ocrtech score-limbu-post-correction-profile \
outputs/limbu-post-correction-profile-derived/limbu-post-correction-profile.json \
outputs/limbu-correction-pair-pack-v1/heldout-limbu-correction-pairs.jsonl \
--out outputs/limbu-post-correction-profile-heldout-score \
--frozen-eval-pack limbu-heldout-corrections-v1
If the held-out score passes, write a new admitted profile instead of editing the profile by hand:
uv run ocrtech admit-limbu-post-correction-profile \
outputs/limbu-post-correction-profile-derived/limbu-post-correction-profile.json \
outputs/limbu-post-correction-profile-heldout-score/limbu-post-correction-profile-eval.json \
--out outputs/limbu-post-correction-profile-admission
Audit the corrected bundle before using its text or correction pairs:
uv run ocrtech audit-limbu-output outputs/limbu-page-corrected
Required Model Shape
The intended model card is a script_select_composite candidate:
- primary recognizer: Devanagari-written Limbu recognizer or strong Devanagari baseline
- secondary recognizer: Sirijonga/Limbu recognizer
script=limburouting_granularity=lineonce both recognizers return aligned line boxesrouting_signal_engine=secondary, so the Sirijonga recognizer's own U+1900..U+194F output can trigger Sirijonga routing even when the Devanagari primary fails to emit Limbu codepointsprimary_guard_script=devanagariandprimary_guard_threshold=0.5, so a primary line that is clearly Devanagari is not replaced by a Sirijonga recognizer hallucinationsecondary_structure_backfill=truewhen the secondary engine has stronger page layout
The current packaged router lives at outputs/limbu-first-router-v1/model-card.json.
It uses Tesseract nep+eng as the Devanagari primary and the exported v4 PaddleOCR
Sirijonga recognizer as the secondary. The Sirijonga backend uses
recognition_mode=auto: normal page images still go through PaddleOCR detection, while
wide/short line crops go straight to the lower-level PaddleOCR TextRecognition
recognizer. That matters because the full PaddleOCR detector failed on a real Sikkim
Herald Sirijonga line crop by detecting only a tiny blank edge strip; recognizer-only
mode emits Sirijonga Unicode for that same crop.
The v4 component was exported from
outputs/limbu-recognizer-v4-2026-06-18/limbu-v4.tgz and packaged at
outputs/limbu-v4-paddle-package-2026-06-21/package/model-card.json. The copied router
component is outputs/limbu-first-router-v1/components/limbu-sirijonga-paddle-v4/.
Both the component and router model-card audits pass, and the guarded runtime preflight
passes under a Python 3.11 OCR environment on this machine:
PYTHONPATH=src /tmp/ocrtech-paddle311/bin/python -m ocrtech.cli preflight-limbu-pipeline \
--model-config outputs/limbu-first-router-v1/model-card.json \
--out outputs/limbu-first-router-v1/runtime-preflight-py311-v4-guarded
PYTHONPATH=src /tmp/ocrtech-paddle311/bin/python -m ocrtech.cli parse-limbu-doc \
path/to/prepared-page.png \
--out outputs/limbu-page-run \
--engine candidate \
--model-config outputs/limbu-first-router-v1/model-card.json
preflight-limbu-pipeline records this as limbu-runtime-preflight.json and
limbu-runtime-preflight.md, including the router model-card audit, nested component
model-card audit, Python executable/version, required Python modules, Tesseract binary,
and required Tesseract language data. The repo's default uv run environment currently
uses Python 3.14 and still fails Paddle/PaddleOCR imports; use the Python 3.11 runtime
above for operational OCR until the project environment is moved to a Paddle-compatible
Python.
On macOS, Tesseract is installed through Homebrew. The full tesseract-lang package is
large; if disk is tight, installing only nep.traineddata beside the bundled eng
language data is enough for this router:
brew install tesseract
curl -L --fail -o /opt/homebrew/share/tessdata/nep.traineddata \
https://github.com/tesseract-ocr/tessdata/raw/main/nep.traineddata
The Python side needs the project OCR engine dependencies plus a platform-appropriate
PaddlePaddle install so that import paddle and import paddleocr both pass. Use the
preflight report as the source of truth after installation.
Current machine note: /tmp/ocrtech-paddle311/bin/python has been recreated with
Python 3.11.13, paddle 3.3.1, and paddleocr 3.7.0. The refreshed preflight at
outputs/limbu-first-router-v1/runtime-preflight-2026-06-21-py311-restored-paddle
passes the runtime dependency checks for paddle and paddleocr, but the overall
router preflight still fails because the deployed Devanagari primary is explicitly
marked failed after the CDC page diagnostic. The runtime is usable for Sirijonga
measurement; the router is not ready until the Devanagari primary is replaced or
re-admitted with evidence.
Do not call this page-level OCR best-in-class until the detector, recognizer routing, and
reading-order behavior have been evaluated on held-out page references. The existing
strong Limbu number is an oracle-crop recognizer result, not a full page OCR result.
The router model card at outputs/limbu-first-router-v1/model-card.json now records
component admission explicitly: devanagari_primary is failed, while
sirijonga_secondary remains experimental until full-page references are scored and
the live crop/reading-order path is improved.
Current Real Runtime Evidence
As of 2026-06-21, the guarded v4 router has local real-asset checks and non-claim diagnostics:
- Gorkhapatra Limbu language-page candidate, now confirmed as
Namdhinggo/Sirijonga-script material rather than Devanagari-written Limbu:
outputs/limbu-dual-script-real-run-2026-06-21/gorkhapatra-devanagari-ocr-v4-guarded. Capture audit and output audit pass. The run produced 98 OCR lines, 22 review lines, four detected tables, average line confidence 0.821, and a warning for low-confidence lines. Routing selected Tesseract for 7 guarded Devanagari lines and PaddleOCR for 91 Sirijonga-classified lines. The output directory still carries the oldergorkhapatra-devanagarirun name, but that is not evidence that the page is Devanagari-written Limbu. - Current-schema rerun of the same real Sirijonga page:
outputs/limbu-dual-script-real-run-current-2026-06-21/gorkhapatra-sirijonga-ocr-v4-currentwas produced from a freshprepare-limbu-capturebundle atoutputs/limbu-dual-script-real-run-current-2026-06-21/gorkhapatra-sirijonga-prep. Capture audit passed; auto-deskew was conservatively skipped because the page had insufficient near-horizontal line evidence. The OCR run produced 92 lines, 4 tables, and 25 review rows, with script countslimbu_sirijonga=79,devanagari_limbu=11,mixed_limbu_devanagari=1, andother=1. Strict capture-plus-Sirijonga audit passed atstrict-audit-capture-sirijonga/limbu-output-audit.json(SHA-25667fe54feab8f636996de78c36cb303e60c5799bdce2fbeca082a9cd2997ce564). The stricter final policy audit intentionally fails withstrict Limbu output policy requires no pending review lines: review_line_count=25; this output is current-format real triage evidence, not a finished digitization. Scoring that current-schema output against a derivative current-input copy of the non-claim Gorkhapatra draft reference atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/score-current-router-v4-currentgives codepoint CER 0.823802, grapheme CER 0.859202, line detection F1 0.010127, and 2/303 matched reference lines. The eval has no document source mismatch, but its audit is not claim-safe: the pack is one unreviewed machine-converted page, not frozen or claim eligible, and the train/dev leakage check has not been run.compare-current-router-vs-live-v4-currentshows this current-schema run is slightly worse than the older guarded live-detector diagnostic, by -0.008158 absolute codepoint-CER and -0.001988 absolute grapheme-CER. Treat this as evidence that the current operational path is still in the same full-page failure regime, not as progress over the prior page output. Replaying the best local image-line diagnostic recipe on the same fresh prepared input gives a better but still unacceptable candidate route:current-image-line-box-documents-width480-wide-rtluses Otsu thresholding, ink boxes, a 23x3 morphology kernel, 12 px crop padding, the width-480 Sirijonga line recognizer, and wide right-to-left order;auto_layoutselects that order on this page from image features alone. The unpruned current-input score is codepoint CER 0.761144, grapheme CER 0.804042, line F1 0.833866, 261/303 matched references, and matched-line codepoint CER 0.106076. A precision-first confidence/script filter (drop_empty, confidence >= 0.85, require Sirijonga/mixed script) keeps 199/323 lines and scores better text but lower recall: codepoint CER 0.730446, grapheme CER 0.763956, line F1 0.792829, precision 1.0, recall 0.656766, and matched-line codepoint CER 0.036114. This is the current best diagnostic path for review triage, but it is not a full-page solution because it deliberately omits 104/303 reference lines plus other unmatched content. The route is now wired intoparse-limbu-docas--line-detection-mode image-line. The operational mode emits normal Limbu artifacts plusimage-line-ocr-run.json,image-line-crops/manifest.jsonl, hashed image-line crop PNGs inlimbu-output-manifest.json, and the usual script-aware review queue/dashboard. It also supports repeatable operational rescue detector passes with--image-line-rescue-detector-pass key=value,...and IoU dedupe via--image-line-merge-iou-threshold; emitted line/crop metadata recordsdetector_source_passandimage-line-ocr-run.jsonsummarizes detected, kept, and removed rows by source pass so primary and rescue detections remain auditable. Optional--image-line-filter-drop-empty,--image-line-filter-min-confidence,--image-line-filter-require-script, and relative geometry flags such as--image-line-filter-min-width-ratioexpose precision-first triage modes; leave those filters off for fuller recall. The current admitted Sirijonga triage recipe is--image-line-filter-drop-empty --image-line-filter-require-script sirijonga --image-line-filter-min-confidence 0.70 --image-line-filter-min-width-ratio 0.05. Final audits for image-line outputs must includeaudit-limbu-output --require-no-dropped-image-linesso filtered partial outputs cannot pass by deleting low-confidence or short-fragment content. Running the operational mode itself on the current prepared page producedoutputs/limbu-operational-image-line-current-2026-06-21/gorkhapatra-width480-unprunedwith 323 kept image-line OCR lines, 0 dropped detected lines, 1 empty crop, 96 review rows, and script countslimbu_sirijonga=293,other=30. Its capture/Sirijonga/no-dropped strict audit passes (SHA-256ec5e62a13be875a86f16cb1725f7cbf586153adbc243d1df1adc3ede2a121300), but final strict policy still fails withreview_line_count=96. Scoring the operational bundle gives the same non-claim diagnostic metrics as the materializer route: codepoint CER 0.761144, grapheme CER 0.804042, line F1 0.833866, 261/303 matched references, and +0.062658 absolute codepoint-CER improvement over the current router. The operational precision-first run atoutputs/limbu-operational-image-line-current-2026-06-21/gorkhapatra-width480-prune-conf085keeps 199/323 lines, removes 124, and has zero review rows. The previous strict final-policy pass without a dropped-line gate is superseded:audit-limbu-output --require-no-dropped-image-linesnow rejects this bundle withremoved_line_count=124(SHA-256a7527a6fe61c23bc37598ade9f8a8d9429b188a1616398e3f76c4f3639735fa4). It remains a high-precision partial-output bundle. Its draft score is codepoint CER 0.730446, grapheme CER 0.763956, line F1 0.792829, precision 1.0, recall 0.656766, and +0.093356 absolute codepoint-CER improvement over the current router; do not treat the zero review queue as page completeness. The refreshed operational line-failure analysis atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/line-failure-analysis-operational-width480-minwidth005-conf070-v4makes the remaining detector miss pattern explicit: 67 references are unmatched, only 2 high-IoU matches are bad-text rows, and 2,422/2,888 attributed codepoint errors are missed reference text. The miss concentration is horizontal, not simply top/bottom: center-band references are unmatched at 42/106 with 1,757 missed-reference codepoints, while left is 9/97 and right is 16/100. The worst combined bands are middle/center (20/42, error mass 810), bottom/center (14/45, error mass 664), and top/center (8/19, error mass 283). The v4 overlap diagnostic shows this is not primarily matched-line swallowing: 65/67 unmatched references have no overlapping prediction at all and only 2/67 reach IoU >= 0.30 against any predicted box. Next detector work should target no-component center-column body-line recall and false-line handling before another confidence-only prune. - Gorkhapatra Limbu Sirijonga page draft eval:
outputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21. The accepted pagegorkhapatra-language-page-0001-01has a PDF-native draft reference generated fromNamdhinggoSILLspans with thelimbu-namdhinggoconverter. It has 303 reference lines, 36 spans with unmapped conversion issues, and remains explicitly non-claim (gt_status=machine_converted_unreviewed,claim_evidence_eligible=false). Scoring the existing guarded live-detector OCR output as--ocr-output-kind live_detectorgives codepoint CER 0.815643, grapheme CER 0.857214, line detection F1 0.009975, and only 2 matched lines out of 303 references. The eval audit passes artifact consistency, but the run is not claim-safe because the pack is one page, not frozen, and not human verified. The oracle-line-box diagnostic atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/score-oracle-line-boxes-v4forces the same v4 recognizer over all 303 reference boxes and scores at codepoint CER 0.029268, grapheme CER 0.060792, matched-line codepoint CER 0.030031, matched-line grapheme CER 0.063993, and line F1 1.0. The paired comparisoncompare-oracle-vs-live-v4shows a non-claim-safe codepoint-CER improvement of 0.786375, so this page is overwhelmingly a live detection/segmentation failure when the boxes are oracle-quality, not a same-font Sirijonga recognizer failure. A tuned morphology detector diagnostic atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/image-line-box-documents-v4-tunedusestools/materialize_page_image_line_boxes.pywith Otsu thresholding, ink bboxes, horizontal kernel 23, vertical kernel 3, max line height 140, 2 px detector padding, and 12 px crop padding. It emits 323 lines, matches 261/303 references, and improves geometry to line F1 0.833866 with mean IoU 0.879406, but page text remains poor: codepoint CER 0.763835, grapheme CER 0.828226, matched-line codepoint CER 0.285785, matched-line grapheme CER 0.551916, and matched-line reading-order pair accuracy 0.606543 over 33,930 aligned-line pairs. The older rawreading_order_pair_accuracyremains 0.0 for this live detector because predicted IDs areimg-line-*while reference IDs arespan-*; use the matched-line reading-order metric for live detector diagnostics. Treat this as a useful detector prototype, not a solved page OCR path. A detector-only reading-order comparison atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/compare-detector-reading-order-column-major-v1usedtools/compare_limbu_sirijonga_detector_reading_order.pyto comparetop_to_bottomwithcolumn_majorunder the same tuned detector parameters; both modes score matched-line reading-order pair accuracy 0.606543, so the simple column-major switch is not a rescue. A detector-only parameter sweep atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/detector-param-sweep-v1evaluated 1,680 morphology configs and found a small geometry improvement by keeping the 23x3 kernel but loweringmax_heightto 80: line F1 0.844660, precision 0.828571, recall 0.861386, 315 predicted lines, and the same 261/303 matches. This candidate can be approximated by filtering the already materialized tuned OCR document because the 315 candidate boxes are a strict subset of the prior 323 boxes.outputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/score-image-line-detector-v4-tuned-maxheight80-filteredshows that reuse-filtered candidate does not improve page text: codepoint CER remains 0.763835 and grapheme CER moves slightly worse from 0.828226 to 0.828392. It still leaves matched-line reading-order accuracy at 0.606543. A line-failure analysis atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/line-failure-analysis-image-line-detector-v4-tunedjoins line alignment with crop provenance and shows the dominant failure: 138/261 matched lines are high-IoU (>=0.85) but bad-text, versus only 11 low-geometry bad-text matches. Those high-IoU bad-text rows have mean IoU 0.893282, mean confidence 0.445911, mean codepoint reference length 45.17, mean crop width 330.88 px, mean crop aspect ratio 6.73, and mean grapheme CER 0.678634. The matched crop-width bands degrade from <=256 px codepoint CER 0.132605 / confidence 0.805627 to 769+ px codepoint CER 0.412653 / confidence 0.219722. The immediate next Sirijonga OCR artifact is the recognizer input-width ablation pack atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/recognizer-width-ablation-v1, with 233 high-IoU matched crops and PaddleOCR line-recognition model-card variants for input widths 320, 480, 640, 960, and 1280. The restored Python 3.11 Paddle runtime scored all five variants with zero prediction failures. Width 480 is the winner on this diagnostic pack: codepoint CER 0.100651, grapheme CER 0.169567, and exact line accuracy 0.278970. Width 320 is much worse (codepoint CER 0.269910), and larger widths regress: width 640 codepoint CER 0.108741, width 960 codepoint CER 0.212755, and width 1280 codepoint CER 0.442740. Testing the same tuned page materialization with the width-480 model card improves matched-line codepoint CER from 0.285785 to 0.105977 and matched-line grapheme CER from 0.551916 to 0.178678, but it does not improve full-page text: page codepoint CER moves from 0.763835 to 0.770900 while matched-line reading-order accuracy remains 0.606543. Treat width 480 as the right Sirijonga line-recognition setting, but not a page-OCR fix by itself. A layout-specificwide_column_right_to_leftordering diagnostic improves Gorkhapatra matched-line reading-order pair accuracy from 0.606543 to 0.763985 with the same 261/303 matches and line F1 0.833866, but the same mode regresses the Sikkim draft from 0.992402 to 0.753361, so it cannot be a global Sirijonga default.tools/materialize_page_image_line_boxes.pynow also exposes--reading-order auto_layout, which records requested and selected ordering plus layout features. The current heuristic selectswide_column_right_to_leftonly for wide pages with column-like regular line widths. On the same detector-only comparisons it matches the Gorkhapatra wide-RTL ordering gain (0.606543 -> 0.763985, result SHA-2569025a7fa5141f970425c22cfd20e29ebb78edadca60b6c6eec2bee0813541204) while keeping Sikkim attop_to_bottomwith zero ordering delta (0.992402 -> 0.992402, result SHA-256a28dff4c45be44d68916bd7df4f2961df74ac079c35e16b885bd5649eb886c12). This is a layout-selection diagnostic, not a recognition improvement by itself. Scoring Gorkhapatra with width 480 plus this wide right-to-left order improves full-page codepoint CER from 0.770900 to 0.761228 and grapheme CER from 0.804207 to 0.803876, while matched-line codepoint CER remains 0.105977. This is useful signal, not a solved page OCR path: the paired sample count is 1, the run is not claim-safe, and the page is still dominated by false predictions, unmatched references, and assembly errors.tools/analyze_page_line_failures.pynow has an unmatched-line diagnostic that writestop-unmatched-references.csv,top-unmatched-predictions.csv, andnear-miss-unmatched-pairs.csv. On the current operational width-480 unpruned run,outputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/line-failure-analysis-operational-width480-unpruned-v4reports 261 matched rows, 42 unmatched references, 62 unmatched predictions, and only 15 high-IoU bad-text matches. The remaining missed references are not mostly easy threshold near misses: only 5/42 have an unmatched prediction with IoU >= 0.30 and 0/42 have IoU >= 0.50. The v4 analyzer now reports attributed codepoint error mass, spatial missed-reference bands, best-overlap against every predicted box, and operational image-line crop manifests that have line ids but nosample_id. On the unpruned route,missed_reference_textremains dominant at 1,416/2,919 attributed codepoints (0.485), and the center band accounts for 31/106 unmatched references plus 1,116 missed codepoints. Only 5/42 unmatched references reach IoU >= 0.30 against any predicted box and none reach 0.50; 28/42 have no overlapping prediction at all. The result JSON SHA-256 isf540fe59bf23b4f9b81c67b8e21f6827a563336d999781132ca4a2b23732c4a0, and the report SHA-256 isa51ddce081e8d0989ce13bbaa90a575aa4887a5e69a2b70c0745f8d7d0c7b467. On the currentminwidth005-conf070operational route, the refreshed analysis atline-failure-analysis-operational-width480-minwidth005-conf070-v4reports 236 matched rows, 67 unmatched references, 2 unmatched predictions, only 2 high-IoU bad-text matches, and dominant error sourcemissed_reference_text: 2,422/2,888 attributed codepoints (0.839). Its spatial bands show center horizontal coverage is the main miss source: 42/106 center references are unmatched with 1,757 missed codepoints, and the worst combined bands are middle/center, bottom/center, and top/center. Result SHA-256:1da537b596b8c6e2b010998fc183289a8e632c75237d509c783b3977ba9e1c65; report SHA-256:d9fef331d97b94877f39b02b8ddf29445d97e96d44cfcaf16e93f6b15ba993ba. This moves the next fix away from simply lowering match thresholds or splitting matched detections. Direct pixel inspection of the largest center-column misses shows the text is visible in the prepared image, but those rows fall inside one rejected Otsu/morphology connected component at[995,401,326,1404]; the detector was discarding a tall merged body component, not failing because ink was absent. A bounded adaptive-threshold branch was tested and rejected:adaptive_mean:41:11under the operational 23x3 settings raised matches from 261 to 263 but only reached F1 0.844302, and adaptive rescue on themax_height=80tuned route lowered F1 below the no-rescue 0.844660 baseline. The admitted detector-only recall fix is now tall-component splitting.src/ocrtech/image_lines.py,tools/materialize_page_image_line_boxes.py, andtools/compare_limbu_sirijonga_detector_reading_order.pyexpose opt-insplit_tall_components/--split-tall-components, row-projection settingssplit_tall_row_min_ink=2andsplit_tall_max_row_gap=4, and provenancedetector_source_pass=primary-split-tall. On Gorkhapatra, the reproducible detector-only run atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/compare-detector-split-tall-maxh80-v1uses Otsu, ink boxes, 23x3 morphology,max_height=80, detector padding 2, and tall splitting; it reaches 285/303 matches, 339 predictions, precision 0.840708, recall 0.940594, F1 0.887850, mean IoU 0.869405, and wide-RTL matched reading-order pair accuracy 0.712824. Result SHA-256:06c242545dce5462dcfb25773b71045c1c3cde026843751d62d2c3a7f44a07c3; report SHA-256:f9dd7e679f733937a5b793e45e38eb02394c8b3fb80fc3f8eb039b3ac770e82c; alignment TSV SHA-256:44feb8ba76840f85b008c0a1c773b3a033d1b11637e3f002ceebcdab23ae7414. Full OCR materialization has now been run and rejects split-tall as an admitted page route by itself.image-line-box-documents-v4-split-tall-width480-wide-rtlwas materialized with the v4 width-480 line recognizer,recognition_mode=line, 339 lines, and 0 empty predictions. Run SHA-256:80808cefbc3804b0385a6c2a2fe16522ebe1a7c307b9447210006905d1712c96; crop manifest SHA-256:7e6b62b25ef17687897034ed70eb1bf09c3d50a407d8a786707825cbd4a99cc5; document SHA-256:da1a1664aee6beb1381ed338f884033c44e5c3a17d9bc9b610f86f778b97563b. Scoring atscore-image-line-detector-v4-split-tall-width480-wide-rtlgives page codepoint CER 0.791421 and grapheme CER 0.831042, worse than the non-split wide-RTL score 0.761228 / 0.803876. Metrics SHA-256:db52ef81012890dbe77179b9deadb72adb04f90c9228cffd2b68860ae5902b18; run SHA-256:33977edad6ff145a24891ecfda9b990f0895074c5043ef902a4ba46f92c8e990. The paired comparison atcompare-split-tall-width480-wide-rtl-vs-tuned-width480-wide-rtlreports negative absolute improvement: codepoint -0.030193, grapheme -0.027166; comparison SHA-25686906240daae771ba960cbd725b19210bde3eb08d4a2d3c4d95e37ca9610835e. The failure shape changed:line-failure-analysis-split-tall-width480-wide-rtl-v1shows 285 matches, 18 unmatched references, 54 unmatched predictions, andmissed_reference_texterror mass down to 425, but page assembly is now dominated by matched bad text/extra prediction text and worse reading order (0.712824 versus the previous wide-RTL 0.763985). Analysis SHA-256:b3d8266031538bce0c63f38f6db4e2f485ac2e18fe26f9fcda4bc3408f05524d; report SHA-256eef5b226a0f60f203501a6c0c2ab48166fd5e159bf91f559df70a4f5c79a64e0. Pruning without fixing order does not rescue split-tall enough:ocr-line-pruning-sweep-split-tall-width480-wide-rtl-v1has best threshold 0.85 with codepoint CER 0.740875 and grapheme CER 0.768759 (sweep SHA-256085765fe1264ec1b45e879cf2677539eb1436f208a5a2e6a01e9b88cea1d1e5f), still worse than the older non-split Gorkhapatra-only conf085 result 0.730362 / 0.763956. The clean comparison atcompare-split-tall-conf085-vs-tuned-width480-wide-rtl-conf085gives codepoint improvement -0.010513 and grapheme -0.004804 (comparison SHA-2564cc4b640ca0ab5e1c6beaac2badeae0f1acf1378674b3c4ccc9a8d67eda92068). A source-pass-aware ordering mode was added:wide_column_right_to_left_split_tall_last. It keeps the existing wide-RTL order for primary boxes and places*-split-tallboxes after primary boxes. Detector-only comparison atcompare-detector-split-tall-wide-rtl-last-v1improves split-tall matched-line reading-order accuracy from 0.712824 to 0.765654 with the same 285/303 matches and F1 0.887850; comparison SHA-256:cce99e017e0e3565c50e56d8886588910d567e94685d8f302e703f155347c636. Full OCR atimage-line-box-documents-v4-split-tall-width480-wide-rtl-lastscores codepoint CER 0.778638 and grapheme CER 0.820938, better than plain split-tall but still worse than non-split wide-RTL before pruning. With the same non-oracle confidence sweep,ocr-line-pruning-sweep-split-tall-wide-rtl-last-v1reaches best conf085 codepoint CER 0.730614 and grapheme CER 0.763624 (sweep SHA-256869381446576317d8258f36557bec4e7da0171e3f613ada59f4c8e44a9b3ca6f). Against the previous non-split conf085 Gorkhapatra result, the clean comparison atcompare-split-tall-wide-rtl-last-conf085-vs-tuned-width480-wide-rtl-conf085is a near-tie: codepoint -0.000252, grapheme +0.000331; comparison SHA-256cfbb25555feab3af1d4863f4f654efd11b94bb18dde047b0b9d2890a330a71f9. Sikkim cross-page detector validation rejects global admission. Without tall splitting,compare-detector-split-last-no-split-v1keeps Sikkim at 59/86 matches and F1 0.559242, but drops matched-line reading-order accuracy from 0.992402 to 0.753361 (comparison JSON SHA-256014bdc6c9fd08d7f82b8292cdcfe0e0a6a08dd2a2a6a6e3a79024e51d7acc813). With--split-tall-components,compare-detector-split-tall-last-v1adds one prediction without adding matches, lowering F1 to 0.556604 while preserving the same order regression to 0.753361 (comparison JSON SHA-25677d2bd30cfc2ed0a2827704c0bf21b51ec3698af3aedb1cc3459382530a9b6fc). Full OCR materialization is intentionally skipped for Sikkim because the detector-only gate already fails. Keepwide_column_right_to_left_split_tall_lastas a Gorkhapatra/layout-specific diagnostic, not as a global Sirijonga route. The safe follow-up is now implemented asauto_layout_split_tall_last: it first detects without tall splitting, uses the existing auto-layout gate, and only reruns tall splitting plus split-last ordering when the page qualifies as a wide-column layout. Detector-only Gorkhapatra validation atcompare-detector-auto-layout-split-tall-last-v1keeps 285/303 matches, F1 0.887850, and improves matched-line reading-order accuracy from 0.712824 to 0.765654 (comparison JSON SHA-2566364dd87e617b3b76236ea37d71b08fab216d5c5ffb8a3b08d6b03560581237b). Sikkim validation atcompare-detector-auto-layout-split-tall-last-v1selects top-to-bottom, keeps 59/86 matches, improves F1 back to 0.559242 by avoiding the split false-positive, and preserves matched-line reading-order accuracy at 0.992402 (comparison JSON SHA-2565aa325d176af4a85dda65a3e3684ae9c80bc7c9a7485e0cb7e0729f8fddf20e7). Full OCR materialization confirms the route behavior: Gorkhapatra emits 339 lines withwide_column_right_to_left_split_tall_last, scores codepoint CER 0.778638 / grapheme CER 0.820938, and exactly matches the explicit split-last OCR score (compare-auto-split-tall-vs-split-tall-wide-rtl-lastJSON SHA-2569326ef4b2e33964d985c734b34ba824977658887ee3ee6f61f7ab8cb724c3b61); Sikkim emits 125 primary lines withtop_to_bottom, scores codepoint CER 0.460255 / grapheme CER 0.576710, and exactly matches the existing image-line baseline (compare-auto-split-tall-vs-image-line-v4JSON SHA-25650b845f80d1212eb2c751ba43070880602c70c506f6682e9f8e1ca0266802e7e). This is a safer candidate branch, not an admitted final policy: the Gorkhapatra unpruned page score is still worse than the non-split wide-RTL score, and claim safety remains blocked by draft machine-converted one-page references. Running the gated branch through the same non-oracle pruning/admission layer confirms that boundary.ocr-line-pruning-sweep-auto-split-tall-minwidth005-v1reaches a Gorkhapatra local best at conf085, codepoint CER 0.730614 / grapheme CER 0.763624, but Sikkim regresses badly at conf085 to codepoint CER 0.702650 / grapheme CER 0.731978. Cross-page admission atoutputs/limbu-sirijonga-auto-split-tall-pruning-threshold-admission-2026-06-21therefore selects conf070, with Gorkhapatra codepoint CER 0.753406 / grapheme CER 0.782508 and Sikkim codepoint CER 0.423454 / grapheme CER 0.511091; admission JSON SHA-256 is2bc16296a6295a03482ef30a01729c5ae7b37278c6623ca38d6431d86a3665ed. Direct comparison against the already-admitted non-split minwidth005 conf070 route rejects promotion: Sikkim is tied exactly, but Gorkhapatra regresses by 0.014045 codepoint CER and 0.014245 grapheme CER (compare-auto-split-tall-minwidth005-conf070-vs-non-split-minwidth005-conf070JSON SHA-256f26b0911a4ba92bce47ea53bee0af6f88a5ef93f61f6361586daacd74d814b70). Keep auto-split-tall as a diagnostic/alternative for recall analysis, not the admitted operational pruning route. The operationalparse-limbu-docpath now has the same rescue-pass family for real OCR runs;tools/materialize_page_image_line_boxes.pyandtools/compare_limbu_sirijonga_detector_reading_order.pynow support repeatable--rescue-detector-passmorphology passes with IoU-based merge dedupe and recordeddetector_source_passprovenance. This creates an auditable way to test multi-pass coverage before running recognition. On the same Gorkhapatra page, the broad rescue passes are not good enough:h15,v1,min_width=20raises matches from 261 to 281 and recall from 0.861386 to 0.927393, but explodes predictions to 702 and drops F1 to 0.559204. The best conservative tested passh41,v1,min_width=250,min_area=250,max_height=80,merge_iou=0.30reaches 264 matches and recall 0.871287, but still lowers precision to 0.774194, F1 to 0.819876, and matched reading-order accuracy to 0.756596 versus the no-rescue baseline F1 0.833866 / order 0.763985. Its comparison JSON SHA-256 is088fdca2fe6865f66998bdd10a41908240232a271ce5567a62a4528e7c02c431. Treat this rescue-pass support as an experiment harness, not an admitted detector improvement. The same harness now supportsmin_aspect_ratio/max_aspect_ratiogates for both primary and rescue detector passes. Aspect-gating the conservative rescue pass atmin_aspect_ratio=8does not admit it: the best aspect-gated result still has 341 predictions, 264 matches, precision 0.774194, recall 0.871287, F1 0.819876, and matched reading-order accuracy 0.756596, below the no-rescue baseline. Its comparison JSON SHA-256 is75934afe974a8189b97b18f61c82dde1d5d87bdbf9a540c93c6ae4aac0f75156.tools/filter_page_ocr_documents.pynow adds a non-oracle OCR-line pruning diagnostic that can drop live lines by empty text, confidence, target script, and geometry while preserving page-eval document compatibility and writing line-level removal reasons.tools/sweep_page_ocr_line_pruning.pywraps that filter with page eval and paired comparison so threshold admission is measured, not copied from a single page.tools/audit_page_ocr_line_filter.pyreplays the filter from the source OCR documents and verifies filtereddocument.jsonfiles, line reports, source hashes, and kept/removed counts; current pruning sweeps run this audit for every threshold candidate. On Gorkhapatra width-480 wide-RTL output, the automated sweep atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/ocr-line-pruning-sweep-width480-wide-rtl-v1confirms pruning empty/non-Sirijonga lines plus confidence thresholds improves page codepoint CER: 0.50 -> 0.746678, 0.60 -> 0.744996, 0.70 -> 0.739697, 0.80 -> 0.738436, 0.85 -> 0.730362, then 0.90 regresses to 0.760387. The best tested Gorkhapatra candidate keeps 199/323 live lines and improves over unpruned wide-RTL page CER 0.761228 by 0.030866 absolute, but remains one-page, draft-reference, non-claim evidence; its standalone filter audit passes with 0 issues (561aae44bf6bc7e5cb5924e969d9eb8d8c41fcfcbcc5958b2888ab6390242258). The Sikkim sweep atoutputs/limbu-page-eval-drafts/sikkim-sirijonga-2020-12-03-page1-v1/ocr-line-pruning-sweep-image-line-v4-v1is the counterexample: 0.85 pruning hurts codepoint CER from 0.460255 to 0.694308, while milder 0.70 pruning keeps 107/125 lines and improves codepoint CER to 0.444063. Its standalone filter audit also passes with 0 issues (581dd1d3c0e07a6210f3fe940efa70fe8e0b998095733c60c57b038b1602f9b4).tools/admit_page_ocr_line_pruning_threshold.pynow performs cross-page operational threshold admission from these per-page sweeps instead of copying the best single-page threshold, and the report records each admitted page's exact documents, score, comparison, and audit hashes. The current admission run atoutputs/limbu-sirijonga-pruning-threshold-admission-2026-06-21requires common thresholds across Gorkhapatra and Sikkim, passing filter audits, and no page-level codepoint/grapheme regression. It selectsconf070: Gorkhapatra improves codepoint CER by 0.021531 and Sikkim improves by 0.016192. It explicitly rejectsconf085because Sikkim regresses by -0.234053 codepoint CER and -0.148799 grapheme CER. Admission JSON SHA-256 iscc8b0b8986c273bafbc73fc74ffc706dd28eeb93343c921aa4572411aae06429; Markdown SHA-256 is9e8672e71d58ae501ddd7024acf34a074ead09b12627cf81f1bff6e3b398b6e5.tools/audit_admitted_page_ocr_candidate.pynow audits the admitted candidate's residual line-alignment failures. The currentconf070audit atoutputs/limbu-sirijonga-conf070-residual-audit-2026-06-21reports 296 matched lines, 93 unmatched references, 51 unmatched predictions, 13 unmatched-reference near misses at IoU >= 0.30, 0 high-IoU unmatched references at IoU >= 0.50, and 26 matched high-text-error rows. Gorkhapatra is now mostly a recall problem (238 matched, 65 references missed, only 2 prediction-only lines; precision 0.991667). Sikkim remains both recall and false-line dominated (58 matched, 28 references missed, 49 prediction-only lines; precision 0.542056). The audit now also buckets residual geometry. Gorkhapatra missed references are mostly short boxes (51/65) concentrated in center and bottom/middle zones; Sikkim misses are mostly medium-width lines (22/28), with bottom-zone misses (13/28), while its prediction-only errors are overwhelmingly short boxes (47/49). The refreshed residual audit now also replays the admitted per-page score/comparison/filter artifact hashes and reportsartifact_integrity_passed=true. Residual audit JSON SHA-256 is28b0edcb15eaf4a3860e2560872ecd419ad5226f88964bf04feaa58104149f64; Markdown SHA-256 is178ce581a9829294da482916880ce9a19df0e103a4f272a4b7b7e11ab44e2516. This is operational, non-claim threshold evidence only; the next page-level work is detector/layout recall for Gorkhapatra short/body misses and Sikkim-specific false-line handling around the stronger 480-wide line recognizer, not morphology-only tuning or a hard-coded ordering/pruning rule. A follow-up relative-geometry pruning sweep now extendstools/filter_page_ocr_documents.pyandtools/sweep_page_ocr_line_pruning.pywith page-relative width/height ratio filters that are replay-audited bytools/audit_page_ocr_line_filter.py. The real sweep usesmin_width_ratio=0.05,drop_empty, Sirijonga script filtering, and confidence thresholds0,0.50,0.70. The cross-page admission atoutputs/limbu-sirijonga-pruning-threshold-admission-minwidth005-2026-06-21selectsconf070again, with mean codepoint-CER improvement 0.029334 and worst-page improvement 0.021867. It improves Gorkhapatra to codepoint CER 0.739361 (238/323 kept) and Sikkim to 0.423454 (82/125 kept). Admission JSON SHA-256 is808a2e08fd853fbc1c612b398e37fe4903808a141a642b82d3338a3f64e632e4; Markdown SHA-256 is09d9d2296f72499c57156b7b4aaca89a13cbcbece82c3a800e53e74d8e247851. The residual audit atoutputs/limbu-sirijonga-conf070-minwidth005-residual-audit-2026-06-21shows why this is still only a triage candidate: total prediction-only rows drop from 51 to 28, and Sikkim prediction precision rises to 0.682927, but total missed references rise from 93 to 97 and Sikkim recall drops to 0.651163. Residual JSON SHA-256 is969868c2eac5decc1a2a4a82848f0c051adbd04c5092d7d010b31698b818e2f5; Markdown SHA-256 is7ca5de60bd49d959a0f14ef96a56228400b42e46b9c0071dc78b8a497c7226d4. Use this relative-width candidate for precision-oriented review triage, not as a complete page OCR policy. A same-row component merge diagnostic now adds an opt-in detector stage that merges horizontally adjacent fragments only when same-row, gap, center-delta, and maximum merged-width gates pass. It is wired throughparse-limbu-doc,tools/materialize_page_image_line_boxes.py, andtools/compare_limbu_sirijonga_detector_reading_order.pyasmerge_same_row_components=falseby default. Withy_tolerance=8,max_gap=120,max_center_delta=300, andmax_width=420, detector-only F1 improves Sikkim from 0.559242 to 0.875000 (90 predictions, 77/86 matches; JSON SHA-256379960a430a943e6076499eff5a744e084f736134a2e0579ad900e97e9dd7aa8) and Gorkhapatra from 0.833866 to 0.875000 (289 predictions, 259/303 matches; JSON SHA-2561b2fdcdb08375ac5896487b66711787e5c59a7566dc88b60fe6e396ca2903421). OCR scoring shows the trap: unpruned same-row merge improves Sikkim codepoint CER from 0.460255 to 0.418057, but Gorkhapatra remains worse than the admitted operational route. Running the samedrop_empty,require_script=sirijonga,min_width_ratio=0.05confidence sweep selectsconf070across pages atoutputs/limbu-sirijonga-same-row-merge-pruning-threshold-admission-2026-06-21(admission JSON SHA-256970a1ad210423d430687d1666f190aa1c4795f516e9998bc4c544a086e45d32f; Markdown SHA-2562cbad5bea8d40ca4a4b49690b705838b306cebe93ac09135887fd0f39ca57c7b). The selected row-mergeconf070improves Sikkim versus the already-admitted minwidth005conf070route (codepoint CER 0.412169 vs 0.423454; comparison JSON SHA-256c4a5f5a2c24f92c678b91098d31b2874546d21fd79347368bc0e5862ebb4c079), but regresses Gorkhapatra (0.744239 vs 0.739361; comparison JSON SHA-256bf8902a27aadc731452990b010be60b125b4fc6cf842f287f8faaeb5aa597aaf). Do not globally promote same-row merge. Treat it as a conditional top-to-bottom fragmented page repair candidate; wide-column pages still use the existing non-merge operational path until a measured layout gate proves otherwise. That measured gate now exists asmerge_same_row_auto_fragmented_top_to_bottom: it first resolves layout on unmerged boxes, only considerstop_to_bottompages, and requires at least 8 boxes and 18% line-count reduction from same-row merging before applying the repair. With this gate, Sikkim keeps the 90-line merged detector result and matched reading-order accuracy 0.990089, while Gorkhapatra stays on the 323-line non-merge wide-column path. Detector comparison JSON SHA-256s aref5a50caaac7ee1eaea2bac4b39917cdb04e5ce8c1c622b620e9dad63e8e5b1f1for Sikkim andda5d57bb77fd1eb2b1f29a69f8b491623631d24e9a8dfccd06a1e7491cbd0d21for Gorkhapatra. The gated OCR/pruning admission atoutputs/limbu-sirijonga-auto-same-row-merge-pruning-threshold-admission-2026-06-21selectsconf070(JSON SHA-2562784674a4b8ff7382086a9d1c544c25729df5f938a792b21b67d81298c9bfeed; Markdown SHA-25681894b8ee2ea515f97523baa42217ba4ca4fe0f7ad0e67610b78daba33e3835c). Against the previously admitted minwidth005conf070route, the gated candidate improves Sikkim codepoint CER from 0.423454 to 0.412169 and grapheme CER from 0.511091 to 0.505545, while tying Gorkhapatra at 0.739361 / 0.768262. This is now the stronger operational candidate for the two draft Sirijonga pages, still bounded by the same non-claim limitations: draft references, two pages, and no native-reader adjudication. The same recipe has now been run through the liveparse-limbu-docpath on the current Gorkhapatra prepared page atoutputs/limbu-operational-image-line-current-2026-06-21/gorkhapatra-width480-minwidth005-conf070. It detects 323 image lines, keeps 238, removes 85, and leaves 39 review rows. The capture/Sirijonga audit passes (e6a97c5949e81cc0194b296e9cb44a9886536229c35b7aa41cd6156421201541), but strict final policy with--require-no-dropped-image-linesfails (cf07d072c55c5ab282c9ed3dd9d54dc61e47c931689e4ba029d162dab51762ef) because review rows and dropped image-line rows remain. Scoring that exact operational output against the one-page Gorkhapatra draft eval gives codepoint CER 0.739361 and grapheme CER 0.768262 atoutputs/limbu-page-eval-drafts/gorkhapatra-limbu-sirijonga-2026-06-21/score-operational-image-line-width480-minwidth005-conf070; metrics JSON SHA-256 is14d0da1bf80e5afb876adfa6191501f2f18039dc86014123d7cf0d64551c4176and eval audit JSON SHA-256 is37c6d0e0efb74d3c61b7a5bd9f3ce5bf4caf0487d47d96ba1f42e7aabfb8b6a9. The eval audit now passes structurally but is intentionally not claim-safe: the pack is unfrozen, machine-converted/unreviewed, one page only, and leakage checking againstrecognizer-width-ablation-v1/manifest.jsonlrecords 233 checked rows withsource_sample_idoverlap ongorkhapatra-limbu-sirijonga-0001-01. - Sirijonga geometry review now has a non-native-reader path:
tools/prepare_line_box_review_packet.pybuilds a geometry-only line-box packet from page eval manifests and reference-seeded boxes, andtools/audit_line_box_review_packet.pyaudits hashes, image dimensions, bbox bounds, unique IDs, valid review statuses, and contiguous reading-order indexes.tools/apply_line_box_review_packet.pyis the ingestion gate for completed geometry review: it refusespendingrows by default, applies accepted/corrected boxes, drops deleted boxes, and writes detector/layout references with emptytextplusclaim_evidence_eligible=false. The current packet atoutputs/limbu-sirijonga-line-box-review-packet-2026-06-21covers the two real Sirijonga draft pages: Gorkhapatra plus Sikkim, 389 seeded line boxes total (303 + 86),audit_passed=true, and 0 issues. It intentionally contains no reference transcription, so it can calibrate layout/reading-order review without a native reader. Applying it currently blocks because all 389 rows are stillpending. This does not certify text ground truth; it only makes detector and layout work reviewable. - Devanagari-written Limbu smoke page draft:
outputs/limbu-page-eval-drafts/limbu-devanagari-smoke-page-2026-06-21. This uses real local Devanagari Limbu text fromdata/synthesis-text/cdjk-rai-limbu-2026-06-16/toolkit-parallel-text.jsonl(bible_brain/LIFWBT_Limburows), but it is a synthetic rendered page, not a real page capture. The pack has 1 page, 14 rendered lines, scriptDevanagari, source-text manifest SHA-256eb16b5fe0535bd3717b259d3d3d9261b02f8931264cc6791b997c1e92b5d9eb3, image SHA-256d56055b686652226124bcf0d547a9bc2ad534046e032d7ba66d663e29888aa1b, reference SHA-256f24cf4e86eee07f150bdc78b50b292ba19a1852cb49a90e60a4e883230b298e5, and pack content SHA-2568a44efc5d89f22ff055269aa3bbf7fe30d088381bbdaf7e83be827b4ab8d493a. The sidecar-perfect score atscore-sidecar-perfectis an eval-harness smoke check: codepoint CER 0, grapheme CER 0, line F1 1.0, matched-line reading-order pair accuracy 1.0 over 91 pairs, and no missing required graphemes in the script inventory. Its audit passes artifact consistency but remainsclaim_safe=falsebecause the pack is synthetic, not frozen, one page, and not human verified. This proves we can exercise Devanagari Limbu page-eval plumbing; it does not satisfy the real Devanagari-written Limbu page requirement. - Limbu page-source inventory gate:
outputs/limbu-page-source-inventory-2026-06-21. The commanduv run tools/inventory_limbu_page_sources.py --out outputs/limbu-page-source-inventory-2026-06-21inspected curriculum page metadata, Sikkim Herald Limbu PDFs, Gorkhapatra Limbu listings, local Devanagari text sources, and the synthetic Devanagari smoke pack. It reports 36 records, 3 real Devanagari page candidates, 3 Devanagari text-only sources, 1 Devanagari synthetic smoke pack, andready_for_real_devanagari_page_eval_draft=true. The three curriculum sources (Maths,Science,Social) are now backed by real CDC Limbu PDFs fetched fromlib.moecdc.gov.npusing refs 3757, 3756, and 3758:mero_ganit_grade1_limbu.pdf(111 pages, SHA-25625fb14113adeb8ca474de70d26bd53455ae7b424de9e92eb43d9028b11e4d186),mero_vigyan_swasthya_grade1_limbu.pdf(89 pages, SHA-256c24178a1789cad5cd209f9dccc8de54c7aa35cf28d7e5966221ccdd2ff2ee97e), andsamajik_adhyayan_grade1_limbu.pdf(87 pages, SHA-256d32366b3a4f80b44817ba633cf25bc3395d3c3df7a418f7999c902d71e938502). Running the same inventory with--require-real-devanagari-pagenow exits 0. This removes the real-source blocker for a Devanagari page-eval draft, but it is still not claim-ready: the curriculum lines need page-image rendering, line/reference alignment evidence, and human or spot-check review before quality claims. - Devanagari-written Limbu CDC curriculum page draft:
outputs/limbu-page-eval-drafts/limbu-devanagari-cdc-curriculum-2026-06-21. The buildertools/build_limbu_devanagari_curriculum_page_eval_draft.pyrenders real CDC Limbu PDF pages and pairs them with the curriculum JSON line text. The current pack contains three real page images: Maths page 8 with 14 lines, Science page 9 with 9 lines, and Social page 9 with 8 lines. Pack content SHA-256 isd587e9ee5cc2983f761142c18de071c2578218d41341b5b2058409e1294ef333; manifest SHA-256 is2a708b3dbd444a05329343482452648e1cc3ecc34954860c95e2935737c10522. The sidecar-perfect score atscore-sidecar-perfectverifies text/reference plumbing: 3/3 pages scored, codepoint CER 0, grapheme CER 0, text exact accuracy 1.0, and reading-order pair accuracy 1.0. It also confirms the real limitation: reference coverage has text=3 and reading_order=3, but line_bboxes=0 and line_alignment_scored=0. The score audit is intentionally not passed and not claim-safe because there are no line-bbox references, no layout references, only three pages, the pack is not frozen, and the GT status iscurriculum_text_unreviewed. This closes the "real Devanagari page draft exists" gap; it does not close the claim-grade Devanagari eval gap. A follow-up line-box draft exists atoutputs/limbu-page-eval-drafts/limbu-devanagari-cdc-curriculum-linebox-2026-06-21. It uses the same three page images, but aligns PDF word-group boxes to the curriculum reference lines. The line-box pack has pack content SHA-256e696a92dee7ac49b4e81659aee7fb344af4c8fa0d4741c6cd43ef074cd052200,line_box_source=pdf_words_machine_aligned, and line-bbox reference coverage for all 3 pages. Science drops 2 private-use marker PDF lines; Social drops 2 extra trailing PDF lines. The sidecar-perfect score atscore-sidecar-perfectaudits cleanly but remainsclaim_safe=false; it verifies the line-layout harness with codepoint CER 0, grapheme CER 0, exact page accuracy 1.0, matched-line CER 0, reading-order pair accuracy 1.0, and line detection F1 1.0. These line boxes are still machine-aligned, not human-verified claim evidence. Running the current Devanagari primary path on the same pack asparse-limbu-doc --engine tesseractproduced auditable but poor live outputs atlive-tesseract-documents; all threeaudit-limbu-outputchecks pass. The page score atscore-live-tesseract-primaryis not claim-safe, but the quality signal is still clear: 3/3 pages scored, codepoint CER 0.897862, grapheme CER 1.390169, exact page accuracy 0, line-bbox coverage 0, and all 58 detected lines entered review. By page, codepoint CER is 0.867220 for Maths, 0.908257 for Science, and 0.927536 for Social. The emitted text is largely Latin/garbled mixed output rather than clean Devanagari Limbu, sonep+engTesseract is not an adequate Devanagari-written Limbu primary for these pages. A quick PSM/upscale sanity check did not rescue it; the best tested setting was still roughly 0.87 codepoint CER. The same Tesseract baseline was rerun on the line-box pack. It audits cleanly as a non-claim diagnostic and repeats the bad page-text result: codepoint CER 0.897862, grapheme CER 1.390169, exact page accuracy 0. Against the new line references, its line detection F1 is only 0.385568 and matched-line codepoint CER is 0.869087. A morphology line-detector diagnostic atimage-line-box-documents-tesseractdetected 83 line-like boxes and ran Tesseract on the crops; 12 crop predictions were empty. The line-box-pack score atscore-image-line-tesseractimproves page text only slightly to codepoint CER 0.865400 and grapheme CER 0.937020, with exact page accuracy 0, line detection F1 0.400301, and matched-line codepoint CER 0.872156. The paired comparison atcompare-image-line-vs-fullpage-tesseractshows a non-claim-safe codepoint-CER improvement of 0.032462 over full-page Tesseract. This is a detector/crop diagnostic, not a solution: line cropping helps a little, but the Devanagari CDC pages are a legacy visual-register OCR problem and need a same-register recognizer/data path plus better detection. - Devanagari-written Limbu CDC recognizer crop draft:
outputs/limbu-recognizer-eval-packs/limbu-devanagari-cdc-line-crops-2026-06-21. This pack is built bytools/build_limbu_devanagari_line_crop_recognizer_pack.pyfrom the CDC line-box page pack. It crops the real rendered CDC page images by the machine-aligned line boxes, writes PaddleOCR-styleeval.txt, and preserves raw PDF legacy strings, source page, source bbox, crop bbox, image hashes, and claim flags inmanifests/recognizer-eval.jsonl. It contains 31 real line crops, pack content SHA-2566d76ab654a0c210a1291f397f2274878d116713a91010ccc91a62cf892ea09b0, andline_box_source_counts={"pdf_words_machine_aligned": 31}. The sidecar-perfect recognizer score verifies the pack is runnable: 31/31 matched lines, codepoint CER 0, grapheme CER 0, exact line accuracy 1.0. The diagnosticnep+engTesseract crop run atscore-tesseract-nep-enghas 31/31 matched predictions but codepoint CER 0.852632, grapheme CER 0.857143, and exact line accuracy 0. This is now the cleanest Devanagari recognizer target: it removes page detection from the measurement and still shows generic Tesseract failing on the CDC visual register. A follow-up legacy-target analysis atlegacy-target-analysis-tesseract-nep-engcompares the same Tesseract predictions against both labels available for each crop: Unicode Devanagari curriculum text and raw PDF legacy word text. Tesseract is not closer to the raw legacy strings: Unicode codepoint CER is 0.852632, raw legacy codepoint CER is 0.880213, and the analysis setslegacy_string_ocr_shortcut_supported=false. So the likely path is not "OCR the legacy Latin bytes, then transduce"; it is a same-register visual recognizer trained or adapted on CDC-like line crops, with the raw legacy strings kept as provenance and alignment evidence. - Devanagari-written Limbu CDC line-crop corpus:
outputs/limbu-recognizer-eval-packs/limbu-devanagari-cdc-line-crop-corpus-devclean-2026-06-21is the current same-register training/dev/eval artifact. It is built bytools/build_limbu_devanagari_cdc_line_crop_corpus.pyfrom all aligned CDC curriculum pages. Alignment coverage is complete for the local curriculum source: 281/281 text pages align, yielding 6,446 raw line crops before leakage filtering. The first large corpus had a 501-row dev split with train/dev leakage, so it should not be used for model selection. The dev-clean corpus excludes train/dev rows that overlap the held-out eval split by image hash, sample hash, or text hash, then also excludes dev rows that overlap train by those keys. It leaves 5,551 train, 258 dev, and 31 sealed eval rows across 254/24/3 pages. Corpus pack SHA-256 is36f10b8b123b792f643e206ca59e3bfd9ce03d5357b5de7ed1cdaba2b92145d1; eval split SHA-256 remains6d76ab654a0c210a1291f397f2274878d116713a91010ccc91a62cf892ea09b0. Both the train/dev audit and the combined train+dev versus held-out eval audit pass under Limbu-specific thresholds with real rows and no leakage. The eval Tesseract baseline from the identical sealed split still fails at codepoint CER 0.852632, grapheme CER 0.857143, exact line accuracy 0.0, and the eval legacy-target analysis again reportslegacy_string_ocr_shortcut_supported=false. - Devanagari-written Limbu PP-OCRv5 training bundle:
runs/limbu-devanagari-cdc-ppocrv5-mobile-training-bundle-2026-06-21packages the dev-clean corpus train/dev rows, staged images, a PP-OCRv5 mobile recognizer recipe, and a passing corpus audit. Archive SHA-256 is01b3689603309c13cb31ef31ff7dc0def65b556a92269d33483ee11da6e8c14d; bundle manifest SHA-256 is95322aa852b14662e22c53ddbc1ae8346f37a51a7d1ae8348ec4f7a5fbf8da9f. After extraction, runpython PaddleOCR/tools/train.py -c training-recipes/ppocrv5-mobile-devclean/paddle_recognizer.yml. The sealed 31-line eval split is intentionally not inside the training recipe; use it only for post-training admission diagnostics. - Devanagari-written Limbu PP-OCRv5 training smoke:
outputs/limbu-devanagari-cdc-ppocrv5-training-smoke-2026-06-21is a 32-train / 8-dev CPU smoke subset made from the portable training bundle withtools/prepare_paddleocr_training_smoke.py. It explicitly recordssealed_eval_used=false; the bundle'slabels/eval.txtis PaddleOCR validation naming for the dev split, not the sealed 31-row held-out eval pack. The smoke was run from scratch for one epoch under/tmp/ocrtech-paddle311/bin/pythonand/tmp/PaddleOCR-v3.7.0, completed 16 train iterations and 4 validation iterations, savedbest_accuracy,latest, anditer_epoch_1checkpoints, and was audited bytools/audit_paddleocr_training_smoke.pywithaudit_passed=true,issues=0. Smoke summary SHA-256 is998ef85358e1858c22bac5966ad00290c2e1809b5d1497d61bea38b94ebc73e7; smoke audit SHA-256 is811950bacfb19bcc936fc84ed89cb617a6732aaa6ef6529cef19acfac37284a6; best checkpoint SHA-256 is3b41eab11423fa1ac3d53bcffd1c8108f211818a9adb7257bf5de25745115535. This is training-path readiness evidence only; it is not a quality result because it uses a tiny subset and no pretrained initialization. - Devanagari-written Limbu held-out admission recipe:
configs/eval-harness-recipes-v1.jsonnow containslimbu-devanagari-cdc-ppocrv5-devclean-heldout. It points at the dev-clean corpus 31-line eval split, uses the combined train+dev manifest only for leakage checking, and validates with no structural issues. It remains non-claim-ready until a trained checkpoint, packaged model card, reproducible prediction command, frozen pack, and reviewed or calibrated references exist. - Devanagari-written Limbu training/admission plan:
configs/limbu-devanagari-ppocrv5-admission-plan-v1.jsonis the machine-checkable guardrail for the next GPU run.tools/validate_recognizer_training_admission_plan.pyverifies the bundle hashes, expected split counts, exact train+dev manifest identity, zero train/dev/eval overlap by sample/image/text hashes, and the rule that checkpoint selection may use only train/dev while the 31-line eval split is sealed. Current validation reportsvalid=True,training_ready=True, andheldout_admission_ready=0; this means the branch is ready to train, not ready to claim or admit. - Devanagari-written Limbu PP-OCRv5 full training job:
outputs/limbu-devanagari-cdc-ppocrv5-training-job-2026-06-21was materialized bytools/prepare_recognizer_training_job.pyfrom the admission plan. It writesrecognizer-training-job.jsonand an executablerun-training.shlauncher using/tmp/ocrtech-paddle311/bin/pythonand/tmp/PaddleOCR-v3.7.0. The job manifest records 5,551 train rows, 258 dev rows, and the sealed 31-line eval split only as an audit artifact withused_for_training=false;archive_member_hits=[]confirms the exact sealed eval manifest/label paths are not in the training tarball. Job manifest SHA-256 isb241f1f0bb7a9011429598fd3c92e5aaffced5a1af6bcb796a81bf5927b611d8; launcher SHA-256 is06a2787a34a1da197c78242c4d05c9b318322789de453af08c54f3b03be56831. The manifest has one warning: the bundle manifest records a required passing corpus audit, but the audit JSON itself is not packaged in the archive. This is a launcher and audit guard only; no full checkpoint has been trained or admitted. - Devanagari-written Limbu PP-OCRv5 runtime pre-training preflight:
tools/preflight_recognizer_training_job.pynow extracts the materialized training bundle into an isolated audit workspace, parses the packaged PaddleOCR YAML, verifiesGlobal.character_dict_pathandGlobal.save_model_dir, checks every train/dev label row against extracted crop files, confirms manifest counts, rechecks sealed eval hashes and archive exclusion, and importspaddle/paddleocrwith the recorded Python runtime. The real preflight atoutputs/limbu-devanagari-cdc-ppocrv5-training-runtime-preflight-2026-06-21reportsready_to_start_training=true,issues=0,warnings=0, train rows5551, dev rows258, missing label images0, malformed label rows0, Python3.11.13, Paddle3.3.1, and PaddleOCR3.7.0. Report JSON SHA-256 is417b8fcb177edd038fe6739a50311656ef2e2930ef8b0ec910361b8b75594289; Markdown SHA-256 isfdd24527d29f5576709427622f3c8b092461bb7ce2c77cc9533e971889392686. This is still only a pre-training launch gate, not a trained model or admission. - Devanagari-written Limbu PP-OCRv5 current-host training launch:
tools/prepare_recognizer_training_runtime_launch.pygeneratedoutputs/limbu-devanagari-cdc-ppocrv5-training-launch-current-host-2026-06-21. This host is CPU-only (compiled_with_cuda=false), so the launcher records explicit PaddleOCR overrides:Global.use_gpu=False,Global.save_model_dir=training-recipes/ppocrv5-mobile-devclean/checkpoints-current-host-cpu,Train.loader.num_workers=0, andEval.loader.num_workers=0. The launch manifest SHA-256 isc56e9211058ff0df87e595fd926b607057339bd96b466468779c13c3eb90d27b; launcher script SHA-256 is1c58b3815ae1fc3e66026c7c51d6c81948749243d93a4d64afa3607dec77e4fd. Training is running in tmux sessionlimbu_devanagari_ppocrv5_training_20260621; the latest verified progress line isepoch: [11/20], global_step: 7000with CPU ETA around7:33:52. This is an in-progress train/dev run only. After it finishes, run the completion audit with the manifest's recorded--workspaceand--checkpoint-dirbefore exporting, packaging, or scoring sealed heldout. - Devanagari-written Limbu PP-OCRv5 training status monitor:
tools/monitor_recognizer_training_run.pywrites a structured status snapshot from the launch manifest, tmux session, live training log, and checkpoint directory. The current snapshot atoutputs/limbu-devanagari-cdc-ppocrv5-training-status-2026-06-21reportsstatus=running,ready_for_completion_audit=false,issues=0,warnings=0, latest progressepoch: [11/20], global_step: 7000,acc=0.375,norm_edit_dis=0.778184,ips=2.44833, ETA7:33:52, latest evalacc=0.20542634862688572,norm_edit_dis=0.6081954332798136, best evalacc=0.20542634862688572,norm_edit_dis=0.6081954332798136at epoch 11, andnext_action=continue_monitoring_training. The monitor now records training-log age against a 900-second stale threshold; this snapshot haswarnings=0. The run is still active, so it is not ready for completion audit yet. Status JSON SHA-256 isd0c2a2bebe9a6a9d1bd5938092247e9ff968714b8708d16d49735943930f4a50; Markdown SHA-256 is9d991c83d98ad85934e05954a88d9761cfd6773c9c232b343456410f3ce20b8c. Re-run this monitor until it reportsready_for_completion_audit=true, then run the completion audit; do not score the sealed heldout split before that. - Devanagari-written Limbu PP-OCRv5 training completion audit:
tools/audit_recognizer_training_completion.pyis the next gate after the long training job finishes. It verifies that the training workspace exists, the PaddleOCR config and dictionary resolve, the selectedbest_accuracycheckpoint is inside the train/dev workspace, and the sealed eval is still post-selection only. When green, it writes the export command, package command, sealed-eval prediction command, and a resolved held-out eval recipe usingrunner.type=model_config. The current audit atoutputs/limbu-devanagari-cdc-ppocrv5-training-completion-audit-2026-06-21is intentionally red:ready_for_export=false,issues=5, because the training workspace/checkpoint do not exist yet. Audit JSON SHA-256 is3fe15749a5c2a83ce9a764c8cc98f9cfe8b107b33d7eb2be728cf831346ef516; Markdown SHA-256 is8e9c9678a4a042a52b9803557b6ff3788b09a4eef05372a11746965354f93890. - Generic Devanagari v2 export preflight:
outputs/limbu-devanagari-primary-candidate-deva-v2-export-preflight-2026-06-21now records a PaddleOCR export, package, model-card audit, and CDC held-out score foroutputs/devanagari-recognizer-v2-2026-06-18/deva-v2.tgz(archive SHA-2567e81660674468f99b2940224fe5ef3e7c9d062d6a05fd3cf4dabf52ac9b4e1df). The extracted checkpoint SHA-256 isddea1db34e89e2c1cdde53d5364eb9156b26dbe8e0a5e67db4c26dd9c97e6676; export recipe SHA-256 is6e18a8cfcf8ebab247be910f9566b30327f10dcd3aef2270ec3979960f7b86c3./tmp/PaddleOCR-v3.7.0was restored at commitb03f46425e8ff4442b268ce449e3eef758146cd4; export required overriding the relative dictionary path and forcing CPU. The packaged line-recognition model card audits cleanly atoutputs/limbu-devanagari-primary-candidate-deva-v2-export-preflight-2026-06-21/package/model-card.json(SHA-2560c41a9811484349805cd608410da3626b795c1601a7ba014c0e23bca69c0efd0). Prediction on the 31-row CDC sealed eval split had 0 runtime failures, but the score is still terrible: codepoint CER 0.835628, grapheme CER 0.858748, exact-line accuracy 0.0, andclaim_safe=false. The score bundle audit atoutputs/limbu-devanagari-primary-candidate-deva-v2-export-preflight-2026-06-21/score-cdc-heldout-auditpasses with zero issues andclaim_safe=false(SHA-2568a538059a0320902196b3a1125edd97b34f21cb9afb4f32826f24c4c08135edf). Treatdeva-v2as a failed generic baseline, not a Devanagari-written Limbu primary. - Sikkim Herald Sirijonga crop:
outputs/limbu-dual-script-real-run-2026-06-21/sikkim-sirijonga-crop-ocr-v4-guarded. Capture audit and output audit pass. The updated auto line-recognition path now emits Sirijonga Unicode and classifies the line aslimbu_sirijonga, but the line still remains in the review queue: confidence is 0.797, and the diagnostic codepoint CER againstdata/sikkim-herald/limbu/_evalpack_demo/line_crop_demo.gt.txtis about 0.095. This improves over the earlier deployed component's roughly 0.302 diagnostic CER, but it is still a single demo crop, not claim-grade scoring. - Sikkim Herald Sirijonga page:
outputs/limbu-dual-script-real-run-2026-06-21/sikkim-sirijonga-page-ocr-v4-guarded. Capture audit and output audit pass. The full-page path emits 22 lines; 20 enter review, average confidence is 0.635, and quality fails at 0.619. The guard protected one Devanagari-looking primary line, but the page remains low quality. This is useful page-level operational evidence, not a success claim. - Sikkim Herald Sirijonga page draft eval:
outputs/limbu-page-eval-drafts/sikkim-sirijonga-2020-12-03-page1-v1. The draft reference was built from the PDF text layer with the Sikkim Herald Limbu legacy-font converter and scaled to the prepared page image. It has 86 machine-converted Sirijonga reference lines and is explicitly not claim evidence (gt_status=machine_converted_unreviewed,claim_evidence_eligible=false). Scoring the guarded live-detector OCR output against this draft as--ocr-output-kind live_detectorgives codepoint CER 0.891560, grapheme CER 0.897412, line detection F1 0.018519, and only 1 matched line out of 86 references. The score audit passes artifact consistency but remainsclaim_safe=false, as it should. A second diagnostic materialized the same 86 PDF-derived reference boxes as line crops, forced the v4 Sirijonga component into recognizer-onlyrecognition_mode=line, and scored the resulting document as--ocr-output-kind oracle_line_boxesatoutputs/limbu-page-eval-drafts/sikkim-sirijonga-2020-12-03-page1-v1/score-oracle-line-boxes-v4. That oracle-box run has 86/86 matched lines, line detection F1 1.0, codepoint CER 0.274289, and grapheme CER 0.548983. The paired comparison atoutputs/limbu-page-eval-drafts/sikkim-sirijonga-2020-12-03-page1-v1/compare-oracle-vs-live-v4shows a non-claim-safe codepoint-CER improvement of 0.617272 over the live detector. This proves detection/layout is a major failure, but the remaining oracle-box CER is still too high; the Sikkim Herald register and/or the draft machine-converted reference also need recognizer and label-quality work. A third diagnostic atoutputs/limbu-page-eval-drafts/sikkim-sirijonga-2020-12-03-page1-v1/image-line-box-documents-v4usestools/materialize_page_image_line_boxes.py: it detects line-like components from image pixels using Otsu thresholding and morphology, computes final boxes from ink pixels, gives the recognizer 12 px of crop margin, and forces the v4 recognizer torecognition_mode=line. Scored as a live detector atscore-image-line-detector-v4, it emits 125 lines, matches 59/86 references, reaches line detection F1 0.559242, codepoint CER 0.460255, and grapheme CER 0.576710. That is materially better than the current Paddle live detector but still well short of oracle boxes. A detector-only reading-order comparison atoutputs/limbu-page-eval-drafts/sikkim-sirijonga-2020-12-03-page1-v1/compare-detector-reading-order-column-major-v1comparestop_to_bottomandcolumn_majorwith the same detector settings; both modes score matched-line reading-order pair accuracy 0.992402. A bounded detector parameter sweep atoutputs/limbu-page-eval-drafts/sikkim-sirijonga-2020-12-03-page1-v1/detector-param-sweep-v1evaluated 900 morphology configs and did not improve on the current detector family: best line F1 remains 0.559242 with 125 predictions for 86 references and 59 matches. Keep this as a detector prototype, not the production default: the Sikkim blocker is overprediction, missed/merged lines, recognizer register quality, and reference verification, not a simple morphology parameter or column-major ordering switch.
The interpretation is blunt: the router is now closer to the required two-script shape, and the v4 recognizer materially improves a real Sirijonga line crop, but full-page Sirijonga quality is still poor. We now have multiple Sirijonga/Namdhinggo page diagnostics, a Devanagari-written Limbu synthetic smoke pack, and a real CDC Devanagari-written Limbu text-only page draft. The Devanagari side is no longer blocked on source discovery, but the current Tesseract primary fails badly on that real CDC draft. It is still not claim-grade until the CDC pages get reviewed text, image line boxes, enough held-out pages, and a Devanagari-written Limbu recognizer or OCR primary that works on this register.
Next Engineering Target
Do not spend more effort polishing generic audit scaffolding before measuring the core failure. The next useful milestone is a tiny frozen two-script page eval pack and a detector-vs-recognizer diagnostic:
- keep
configs/eval-target-coverage-v1.jsonas the top-level claim coverage gate. Itslimbu-first-two-script-ocrtarget set must show bothlimbu/Limbuandlimbu/Devanagarias coverage-ready before any two-script Limbu OCR claim. This target set requires both recognizer eval recipes and full page-level eval recipes, so recognizer-only readiness cannot satisfy the page-capture goal. - promote at least one Sirijonga page reference from machine-converted draft to reviewed
status, and promote the CDC Devanagari draft from text-only reference to reviewed
page reference with source image hashes, source document/page/bbox provenance, GT
trust status, claim eligibility, and line-level image boxes. The existing Devanagari
smoke pack is useful for harness regression only; the CDC pack is the real-page
draft, but it is not a substitute for reviewed line-bbox evidence. Use
tools/inventory_limbu_page_sources.py --require-real-devanagari-pageas the source-readiness gate before claiming new Devanagari sources exist - score the same pages twice: once with live detector boxes from
parse-limbu-doc, and once with oracle/PDF-derived line boxes passed to the recognizers; record these scorer runs as--ocr-output-kind live_detectorand--ocr-output-kind oracle_line_boxes - if oracle boxes recover the line-crop-level quality while live detector boxes fail,
prioritize a Sirijonga-capable text detector and reading-order path; that is the
oracle-quality Gorkhapatra finding. If live-detected boxes have good geometry but
high matched-line CER, as the current tuned Gorkhapatra morphology detector does,
improve crop tightness, crop padding, line splitting/merging, and line-recognizer
robustness before celebrating detector F1. If matched-line reading-order accuracy is
materially below oracle, improve column/article ordering from aligned-line evidence
rather than relying on raw reading-order IDs.
tools/materialize_page_image_line_boxes.pynow exposes--reading-order column_majorand--reading-order auto_layoutas explicit diagnostics alongside the defaulttop_to_bottom.auto_layoutrecords the requested mode, selected mode, and layout features in each materialized document.tools/compare_limbu_sirijonga_detector_reading_order.pynow provides a recognizer-free way to compare those modes against reference line boxes; current Gorkhapatra and Sikkim runs show zero delta forcolumn_major, whileauto_layoutrecovers the Gorkhapatra wide-RTL ordering gain without flipping Sikkim. Keep this as measured layout selection, not claim-grade OCR quality.tools/sweep_limbu_sirijonga_detector_params.pyranks detector-only morphology configs before recognizer runs; the current sweep finds a minor Gorkhapatra precision improvement and no Sikkim improvement. If oracle boxes remain high-CER as they do on the current Sikkim draft, split work between detector improvement, same-register recognizer data, and reference verification - calibrate the Devanagari primary guard and review thresholds against page CER instead
of treating Tesseract confidence or script ratios as evidence. The current CDC
diagnostic shows this calibration cannot be a threshold tweak only:
nep+engTesseract is around 0.898 codepoint CER on the real Devanagari draft, so a stronger Devanagari-written Limbu recognizer/data path is required
Outputs
Each run writes the normal parser outputs:
document.jsondocument.mdquality.jsontables/figures/
The Limbu wrapper also writes:
limbu-capture-prep.json: raw/prepared image paths, hashes, cleanup operations, source/prepared image-quality metrics, timestamp, and run contextlimbu-capture-audit.json/.md: verification that the raw copy, prepared image, recorded hashes, decodable image bytes, image-quality metrics, and capture operation metadata are still consistentcapture-prep-audit/limbu-capture-audit.json/.md: the capture audit copied into an OCR output bundle when--capture-prep-metadatais usedlimbu-pipeline-audit.json: run-level line counts, script counts, thresholds, and claim scopelimbu-line-audit.jsonl: one row per OCR line with Sirijonga/Devanagari ratios and review flagslimbu-post-correction-audit.json: deterministic Limbu post-correction status, profile id/path/hash, rule count, changed count, and claim scopelimbu-post-correction-lines.jsonl: one row per OCR line with original text, corrected text, applied rule ids, and changed flaglimbu-review-queue.tsv: only lines that need human reviewlimbu-review-dashboard.html: a static review dashboard that pairs each queued line with its crop, script class, confidence, review reasons, OCR text, and TSV correction rowline-crops/manifest.jsonlandline-crops/summary.json: one crop-lineage row per OCR line, with crop paths/hashes when the source page is croppablelimbu-correction-audit.json: accepted review corrections applied to a corrected documentlimbu-correction-pairs.jsonl: noisy/clean line pairs for future Limbu-specific corrector traininglimbu-output-manifest.json: run context, input provenance, and paths, sizes, and SHA-256 hashes for emitted artifactslimbu-output-audit.json/.md: verification that the output manifest, artifact hashes, counts, and stage-specific audits are still consistent
Lines enter the review queue when confidence is missing, confidence is below the chosen
effective threshold, the line mixes Devanagari and Sirijonga, or the output contains
neither script. parse-limbu-doc keeps the global --low-confidence-threshold default
but can override it per script with --sirijonga-low-confidence-threshold,
--devanagari-low-confidence-threshold, --mixed-script-low-confidence-threshold, and
--other-script-low-confidence-threshold. These threshold inputs, plus
script_ratio_threshold, are validated as finite ratios in [0, 1] before OCR
artifacts are emitted, so booleans, NaN, and out-of-range values cannot silently alter
review routing or script classification. The audit replay validates the embedded
limbu-pipeline-audit.json thresholds again before using them, so a refreshed manifest
hash cannot legitimize invalid script-classification policy. limbu-line-audit.jsonl,
limbu-review-queue.tsv, and limbu-review-dashboard.html record the effective review
threshold for each queued line so script-specific triage is replayable. The review TSV
is intentionally simple so corrections can become future calibration or post-correction
training data; limbu-review-dashboard.html is the human-facing contact sheet for those
same rows and is included in the manifest hash contract.
audit-limbu-output replays line triage from document.json: it recomputes script
class, effective review threshold, review reasons, needs_review, script counts, and
review-line count, then fails if limbu-line-audit.jsonl, limbu-review-queue.tsv, or
limbu-pipeline-audit.json drift from the document. Review queue replay includes the
queued confidence, so a low-confidence line cannot be silently presented to reviewers as
high-confidence text.
For operational digitization runs, audit-limbu-output also has opt-in strict policy
gates: --require-capture-prep requires a passing capture-prep audit to be bound into
the OCR output and replays the current capture-prep metadata/artifact hashes from disk,
the --min-capture-prepared-* flags forward prepared-image quality thresholds into
that capture replay and fail low-resolution, low-texture, or low-contrast prepared
images. Those capture-threshold policy inputs are validated as finite non-negative
numbers before audit work starts, so invalid thresholds fail as configuration errors,
--require-no-pending-review fails OCR outputs that still have review lines or
correction outputs with skipped review rows, and repeated --require-script
flags require observed line counts for specific script classes such as
limbu_sirijonga and devanagari_limbu. Required script names are normalized and
validated against the fixed Limbu script-class vocabulary before audit work starts, and
boolean count values are rejected instead of being treated as 1, so misspelled or
ambiguous policy inputs fail as configuration errors instead of becoming ordinary
missing-script output failures. For stricter acceptance,
--require-script-count SCRIPT=COUNT requires a minimum observed line count for a
script class, so a token-level accident or one-line smoke cannot satisfy a real
two-script coverage policy. --min-line-count, --min-average-line-confidence, and
--min-quality-score add explicit output-volume and quality gates using the audited
document.json quality metadata, and --min-line-count rejects boolean API values, so a
nearly empty or low-confidence output cannot pass strict acceptance only because
provenance and script classes are present. These flags
are intentionally not defaults:
development and diagnostic bundles can still be audited for artifact integrity, while
real page digitization can demand capture provenance, prepared-image quality, zero
unresolved review rows, enough text volume, minimum quality, and the expected script
coverage. For capture-prep bundles themselves, use
audit-limbu-capture --require-metadata-path-self so copied or renamed metadata cannot
quietly stand in for the recorded metadata_path; for full OCR output bundles, use
audit-limbu-output --require-capture-metadata-path-self to enforce the same check
during capture replay. A fresh two-script smoke at
outputs/limbu-strict-output-policy-smoke-2026-06-21 passed the strict policy with
require_capture_prep=true, require_no_pending_review=true, and required scripts
limbu_sirijonga plus devanagari_limbu; strict audit JSON SHA-256 is
2fc71f191ba581d58f59480b54695a9297778f3c54a2a63c8a7da339d618142e.
Only rows whose review_status is accepted by
apply-limbu-review-corrections are applied; duplicate accepted targets and accepted
rows with empty corrected_text fail explicitly. Accepted review rows also use the
same constrained script_class vocabulary as correction-pair packs and post-correction
profiles; explicit typos fail in both the writer and the audit replay path.
For review_correction bundles, audit-limbu-output now replays the accepted TSV
rows from the original document_path and review_queue_path recorded in
limbu-correction-audit.json, verifies their SHA-256 hashes, binds manifest
provenance.input_document and provenance.review_queue to those same paths/hashes,
recomputes applied, changed, and skipped counts using the source OCR document's recorded
script_ratio_threshold, then compares the replayed document text and
limbu-correction-pairs.jsonl rows against the emitted corrected bundle. It also
replays the corrected line's embedded metadata.limbu_pipeline review flags and
post_correction reviewer/status/original/corrected-text metadata. This means a
corrected document.json, embedded correction story, or training-pair JSONL cannot be
trusted just because the files exist or the counts match; they must be reproducible from
the source OCR document and the reviewed queue. For claim-grade corrected bundles, add
--require-reviewer-for-corrections; this strict policy fails accepted correction rows
whose reviewer field is blank while still allowing quick non-claim experiments to run
without reviewer metadata.
Post-Correction Boundary
The current automatic post-correction lane is deliberately deterministic. If
--post-correction-profile is supplied, the profile must be a Limbu JSON object with a
profile_id, language=limbu, script_scope, and exact/token rules whose replacements
contain Limbu or Devanagari text. Rule IDs must be unique. script_scope and
rule-level script_class values must be one of limbu_sirijonga,
devanagari_limbu, mixed_limbu_devanagari, or other; typo aliases such as
sirijonga are rejected instead of silently disabling a rule. The profile is applied
before review export, and every line records original text, corrected text, applied rule
ids, profile hash, profile admission status, and changed status. With no profile, the
same artifacts are still written with status=not_configured, so missing automatic
correction is visible.
Profile admission is intentionally separate from profile shape. A profile with no
admission object can run, but it is marked experimental and audit-limbu-output
warns that automatic corrections are not claim-ready. A profile that claims
admission.status=validated must record a hashed eval artifact, frozen eval-pack
identifier, metric name, and before/after metric values where after <= before;
otherwise parse-limbu-doc fails instead of applying the profile. This keeps
language-specific post-correction useful for triage without letting it become an
unverified accuracy claim.
The human-reviewed correction lane remains separate. That is intentional: prior generic
text-corrector experiments made OCR substantially worse, so any learned Limbu corrector
should be trained only from reviewed Limbu correction pairs and admitted through the same
held-out eval discipline as recognizers. The corrected document records the original OCR
text, corrected text, reviewer/status, review TSV hash, and
post_correction.status=human_review_applied on each changed line; it also records the
source OCR document's script_ratio_threshold so inferred correction-pair script classes
use the same script policy as the reviewed OCR output. Output audit now replays those
embedded fields against the source document and accepted review TSV.
build-limbu-correction-pair-pack canonicalizes accepted noisy/clean pairs into a
frozen train/heldout correction pack with source pair-file hashes, deterministic
SHA-256 split selection, a pack-content digest, and claim_eligible=false rows. The
heldout split is the input for post-correction profile scoring; the pack is calibration
evidence, not page OCR ground truth.
audit-limbu-correction-pair-pack independently replays that pack: it checks the
summary artifact, train/heldout file hashes, row counts, split labels, duplicate sample
IDs, row text shape, source pair-file hashes when available, and the canonical
pack_content_sha256. Run it before using the train split for profile derivation or
the heldout split for admission scoring.
derive-limbu-post-correction-profile converts accepted
limbu-correction-pairs.jsonl rows into exact-match deterministic rules only after
normalizing the noisy/clean text, dropping unchanged rows, hashing every source pairs
file, enforcing minimum support, and rejecting conflicting mappings from the same noisy
text to multiple clean texts. The generated profile is still marked
admission.status=experimental; it is useful for repeatable triage, not claim-ready
automatic correction, until a frozen held-out post-correction eval is attached and
passes audit-limbu-post-correction-profile.
score-limbu-post-correction-profile applies the same profile loader and rule engine
used by runtime OCR to held-out noisy/clean pairs. It writes
limbu-post-correction-profile-eval.json,
limbu-post-correction-profile-eval-lines.jsonl, and Markdown, reporting
text_cer_codepoint_micro before and after correction, changed/improved/regressed row
counts, source pair-file hashes, profile hash, and the eval JSON SHA-256 printed by the
CLI. The score fails if aggregate codepoint CER regresses or if any held-out row gets
worse. A profile can only claim admission.status=validated after that eval JSON hash
is copied into admission.eval_run_sha256 with the frozen eval-pack identifier and
non-regressing before/after values.
admit-limbu-post-correction-profile performs that admission copy under guard. It
refuses failed evals, eval/profile SHA mismatches, missing frozen eval-pack identifiers,
non-numeric metrics, aggregate regressions, and any regressed held-out row. It writes a
new limbu-post-correction-profile-admitted.json, an admission report, and an audit
directory; the source profile is not mutated in place.
Both OCR and correction stages write limbu-output-manifest.json, so a reviewer can
verify exactly which artifacts were produced by that stage and whether any expected
artifact is missing. OCR manifests also hash the model card, fallback model card,
capture-prep metadata, and post-correction profile when supplied; review-correction
manifests hash the source document and review TSV. audit-limbu-output recomputes those
provenance hashes, replays manifest source_path / source_sha256 and binds the source
path fields to document.json.source_path, checks OCR capture-prep/profile provenance against
limbu-pipeline-audit.json and limbu-post-correction-audit.json, and, for
review-correction bundles, checks that the manifest points to the same source document
and review TSV recorded in limbu-correction-audit.json, so changed or substituted
capture/model/profile/review inputs make the bundle fail audit.
It also enforces the fixed required artifact set for OCR and review-correction stages;
removing a required artifact from limbu-output-manifest.json is itself an audit
failure, even if the file still exists on disk.
audit-limbu-output recomputes artifact hashes, validates document counts against the
manifest, checks OCR line/post-correction/review/crop counts, verifies capture-prep audit
status when present, reruns the capture-prep audit into capture-prep-replay-audit/,
verifies post-correction profile hashes and crop hashes when they exist, replays
image-line crop manifests against image-line-ocr-run.json and the current crop PNG
hashes, checks kept image-line crop rows against document.json line ids, bboxes,
text, confidence, and embedded crop provenance, checks image-line run metadata against
the current source image and the duplicated document/page metadata, binds image-line
model config metadata to limbu-output-manifest.json provenance path/hash, replays
image-line detector source-pass count summaries when present, checks that review
queue triage fields, including confidence, still match the needs_review rows in
limbu-line-audit.jsonl, replays each document.json line's embedded
metadata.limbu_pipeline script ratios, script class, review flag, review reasons, and
effective review threshold from the current line text/confidence after validating the
embedded replay thresholds, replays embedded
post_correction metadata from limbu-post-correction-lines.jsonl and
limbu-post-correction-audit.json, and checks that the review dashboard card count, displayed
line metadata, displayed confidence, displayed OCR text, TSV copy row, and crop link
still match the review queue and crop manifest. For corrected bundles, it then replays
the review-correction audit from the original source document and review queue, verifies
the recorded input hashes, and checks corrected document text plus noisy/clean
correction pairs against that replay.
When strict policy flags are used, the generated limbu-output-audit.json records the
policy object beside the pass/fail result so later reviewers can tell whether an output
was merely artifact-consistent or operationally acceptable for the intended capture and
script scope.
Capture And Cleanup Requirements
The capture source should preserve page detail before OCR:
- use full-page still images as the OCR input contract
- if moving-camera material exists upstream, convert it outside this pipeline into sharp still page images before capture cleanup
- deskew and perspective-rectify before line recognition
- keep the raw still image, rectified page, line crops, OCR JSON, and review TSV together
- never overwrite a raw capture with a cleaned image
The current capture command preserves the raw image, applies EXIF transpose, optional
manual crop, optional automatic four-corner page detection, optional manual four-corner
perspective rectification, optional automatic text deskew, optional
manual rotation, grayscale conversion, and autocontrast. --auto-detect-page searches
for a large convex page contour and records the detected quad plus area ratio before
rectification. --auto-deskew first uses OpenCV near-horizontal line evidence to
estimate skew after crop/perspective cleanup, then falls back to row-projection scoring
over text ink so fragmented glyph rows can still be deskewed. It records either the
detected/applied angle or a skipped status when the page does not contain enough
evidence; use
--max-auto-deskew-degrees to cap automatic rotation. --perspective-quad uses corners
in this order: top-left, top-right, bottom-right, bottom-left, measured after EXIF
transpose and after the optional crop. It does not implement moving-frame selection;
that is outside this OCR pipeline's input contract. limbu-capture-prep.json records
the operation sequence, raw and prepared hashes, source/prepared image-quality metrics
including size, luminance spread, edge spread, and entropy, timestamp, and
command/runtime context when run through the CLI.
audit-limbu-capture verifies the raw copy and prepared image hashes, validates capture
operation metadata, checks existing capture artifacts are decodable images, replays
recorded quality metrics for available images, fails stale or missing prepared artifacts,
and only warns if the original source path has moved after the raw copy was preserved.
For frame-extracted stills or field captures, pass opt-in quality gates such as
--min-prepared-width, --min-prepared-height, --min-prepared-entropy,
--min-prepared-luminance-stddev, and --min-prepared-edge-stddev; the audit records
the chosen quality_policy and fails prepared images below those thresholds.
When parse-limbu-doc receives a croppable prepared page image, it also writes tight
line crops under line-crops/ using the OCR bboxes; non-croppable sources still get a
line-crop manifest with warnings so missing crop lineage is visible.
Claim Boundary
This pipeline is operational evidence. It is not enough for a paper claim unless the same outputs are scored against frozen page references with source-image hashes, page/line provenance, ground-truth trust labels, script inventory coverage, leakage checks, confidence intervals, and worst-page review artifacts.
The current real-page diagnostic baseline is
outputs/limbu-measured-page-baseline-2026-06-22/README.md. Treat it as engineering
evidence only, not a public result: the references are unreviewed or machine-converted,
the packs are not frozen/claim-eligible, and current audits are not clean under the
latest stricter page-audit rules. The important signal is accuracy direction: Devanagari
CDC pages need the active PP-OCRv5 recognizer before the result is meaningful, while
Sirijanga Gorkhapatra/Sikkim pages are dominated by detector/layout misses before
recognition quality.
The current Devanagari page-marker-v2 candidate is now registered in the eval harness as
limbu-devanagari-cdc-page-marker-v2-champion-coverage-gated, and the
limbu-first-two-script-ocr coverage target points the Devanagari page-eval slot at it.
That is not a readiness claim. The latest validators report
recipes=12 valid=True claim_ready=0 and
valid=True coverage_ready=False target_sets=3 gaps=50; the top-level two-script set
still has 6 gaps across Sirijonga/Limbu and Devanagari normalization, recognizer, and
page recipes. The Devanagari slot is operationally registered but blocked by 3-page
draft scope, 0 claim-ready references, unreviewed GT, unfrozen rows, missing
hash-verifiable model artifacts, claim_safe=false, and unresolved review rows.
The Sirijonga page recipe is now reproducible as a sidecar replay through
tools/copy_page_ocr_document.py; it replays the current operational
conf070 page-document bundle into run_eval_recipe.py and records hashes. The smoke
run at outputs/eval-recipe-smoke-limbu-sirijonga-gorkhapatra-page-current-router/
passes audit but stays claim_safe=false: 1 machine-converted unreviewed page, 0
claim-eligible rows, codepoint CER 0.739361, line F1 0.872458, and matched-line CER
0.046585. This removes a harness reproducibility blocker, not the underlying OCR
quality or data-readiness blockers.
The current selected Sirijonga diagnostics now have review packets for unresolved page
regions: outputs/limbu-sirijonga-page-unresolved-review-2026-06-22/. Gorkhapatra
conf070 contributes 69 textless review crops, mostly center-column missed lines;
Sikkim same-row merge contributes 22 textless review crops, split between missed lines
and extra predictions. Both packet audits pass with 0 hidden-reference leaks. Use these
packets as the next layout/recovery substrate before another detector sweep.
The packets now include a blank corrected_text review field, and
tools/apply_unresolved_page_review_packet.py applies reviewed rows back to scoreable
page-document projections. Pending rows are no-ops; accepted/corrected
missed-reference rows require non-empty corrected_text; accepted/corrected unmatched
predictions update the existing line only when corrected_text is supplied; false
positives are deleted only with explicit drop/delete statuses. Pending application
smokes exist for both Sirijonga diagnostics and score identically to the source
outputs: gorkhapatra-operational-conf070-review-application-pending at codepoint CER
0.739361 and sikkim-same-row-merge-review-application-pending at codepoint CER
0.418057. tools/audit_unresolved_page_review_coverage.py independently verifies
that these packets cover every current unmatched alignment row without writing hidden
reference text: Gorkhapatra covers 67/67 missed references and 2/2 extra predictions;
Sikkim covers 9/9 missed references and 13/13 extra predictions.
The strongest current Gorkhapatra Sirijonga recovery evidence comes from the rejected
auto-split-tall branch, but only as a review source. The selected conf070 documents
compared against auto-split-tall yielded 100 candidate-only page rows with a passing
packet audit. Oracle/reference-overlap analysis shows 49 of those rows correspond to
the 67 currently missed references, and applying their candidate OCR text through
tools/apply_candidate_page_line_reviews.py raises line F1 to 0.964346 with
precision 0.993007 and recall 0.937294. That is not a usable text-output win:
page codepoint CER worsens to 0.766779 from selected conf070's 0.739361, and
grapheme CER worsens to 0.798907. The operational action is therefore to keep
auto-split-tall rows in the non-oracle prioritized review queue at
outputs/limbu-sirijonga-page-unresolved-review-2026-06-22/gorkhapatra-auto-split-tall-prioritized-candidate-line-review/
(100 body-line candidates, 99 high priority, audit passed), then accept reviewed
transcriptions or improve recognition on those crops before insertion. Do not make
auto-split-tall candidate text the default book OCR output.
The corresponding non-oracle crop probe at
outputs/limbu-sirijonga-page-unresolved-review-2026-06-22/gorkhapatra-auto-split-tall-candidate-line-text-crop-probe/
processed all 100 body-line candidates and refined 44 by trimming top bleed from
multi-row crops. Use it for targeted Sirijonga recognizer/reviewer work; it is not an
application result.
Running the packaged v4 Sirijonga recognizer over those original/refined crops exposed
and fixed a harness issue: recognizer predictions can contain multiple text lines, so
tools/predict_recognizer_eval.py now flattens embedded newlines/tabs before writing
TSV. The refined-crop recognizer comparison changed 40/100 predictions and reached max
confidence 0.992109, but remains automatic_application_safe=false. A strict
machine selector (0.90 confidence, 0.05 confidence delta) slightly improves page
codepoint CER to 0.737090, but lowers line F1 to 0.866545 and increases extras to
7. That is not acceptable as the default book OCR policy; it is a candidate source for
reviewed insertion or a better crop recognizer.
tools/audit_candidate_page_line_application_effect.py now enforces that distinction
for page-candidate insertions. The strict recognizer-probe application is rejected as
book_ocr_objective_safe=false: 6 inserted rows, only 1 match, 5 extras, and the one
matched inserted line has codepoint CER 0.888889. For this product, a CER-only gain
with worse line preservation is a failed candidate.
The safe oracle-feature diagnostic for those 100 candidates is
outputs/limbu-sirijonga-page-unresolved-review-2026-06-22/gorkhapatra-auto-split-tall-oracle-feature-analysis/
(report / TSV SHA-256
4c45a640338b6510b63bced5b903b847e4725ab87f544fb36ba7def7ac2e2bb0 /
21e31ff240b2a40220b70b9f029237064b83c951509b6bea62ec9fc4855098bf). It confirms the
deployable signal is not refined recognizer confidence: selected rows average much
lower refined confidence than rejected rows (0.382649 versus 0.601181), and the
strict 0.90 / 0.05 selector finds only 1 oracle-selected row out of 6. The useful
rows are instead longer and wider body-line candidates. Any future automatic Sirijonga
candidate insertion should therefore be a geometry/text-feature selector, not another
confidence-only threshold, and it must pass the page-level effect audit.
The first geometry/text selector pass confirms the boundary.
tools/select_candidate_line_reviews_by_geometry_text_features.py with
min_candidate_text_length=30, min_bbox_width=80, and y-band
middle,bottom_or_right selects 31 rows; oracle-overlap diagnosis marks all 31 as
useful missing-line candidates. Applying their machine text improves line F1 to
0.933566 and recall to 0.881188 with no new extras, but page codepoint CER worsens
to 0.761733 and reading-order accuracy drops to 0.604292, so the effect audit
rejects it. A looser min_candidate_text_length=10 setting selects 38 rows, finds
35 useful candidates, adds 3 extras, and also fails. This is now a review/crop-target
worklist, not a promotion candidate.
Candidate insertion now supports explicit ordering strategies in
tools/apply_candidate_page_line_reviews.py. The old geometry mode is retained for
reproducibility, but it globally sorts by raw page/y/x and is poor for wide-column
Gorkhapatra. preserve_source_append preserves the selected source order and appends
reviewed candidate lines; on the 31-row precision selector it keeps all inserted rows
matched and raises reading-order accuracy from the geometry diagnostic's 0.604292 to
0.750472, though it still fails because candidate text worsens page CER. A
source_reading_order re-sort with wide_column_right_to_left was also tested and is
worse on this application. The 31 precision-first rows have a pending transcription
worklist at
outputs/limbu-sirijonga-page-unresolved-review-2026-06-22/gorkhapatra-auto-split-tall-geometry-text-selection-len30-w80-y-midbot-transcription-worklist/;
it has JSONL/TSV/HTML/labels, blank corrected_text, no reference fields, and 31/31
resolving crop links. tools/audit_candidate_line_transcription_worklist.py verifies
that worklist before review; the current audit passes with 31 pending rows, 0 crop
hash mismatches, 0 forbidden fields, and 0 issues.
The reviewed-worklist application bridge is now available as
tools/apply_candidate_line_transcription_worklist.py. It compiles accepted/corrected
worklist rows into candidate-page application JSONL only when corrected_text is
non-empty, the reviewer is not machine/oracle/auto, and crop hashes validate. The
current 31-row worklist is pending-only, so its pending compile accepts 0 rows and the
downstream candidate-page application inserts 0 rows; the scored output remains
identical to selected conf070 (0.739361 codepoint CER, line F1 0.872458). This is
the mechanical path for real reviewed text; it deliberately does not apply pending
machine suggestions.
A diagnostic-only oracle ceiling now prevents a bad next step. The helper
tools/select_candidate_line_reviews_by_oracle_subset.py joins the 31 geometry/text
worklist rows to the oracle/reference-overlap selected rows, producing an unsafe
reference-text ceiling artifact with 31 selected and 0 rejected rows. Even with perfect
reference text, the 31 insertions are not a book-OCR win under append or raw geometry:
line F1 improves to 0.933566 and misses drop to 36, but page codepoint CER worsens
to 0.771993 with preserve_source_append and 0.771825 with raw geometry ordering,
versus selected conf070 at 0.739361. The new candidate_document_order mode is
the promising direction: it uses candidate-document line order and bbox-IoU mapping,
bringing codepoint CER to 0.739024, line F1 to 0.933566, misses to 36, extras to
2, and reading-order accuracy to 0.775506. It is still not admissible because
grapheme CER worsens to 0.778367. Reviewed transcription is useful only if paired
with this slotting mode and grapheme-level normalization/text repair.
The non-oracle machine-text version under candidate_document_order confirms that
ordering alone is not enough: line F1 and reading order match the oracle-ceiling
surface, but page codepoint CER is 0.763078 and grapheme CER is 0.797416. Do not
apply machine candidate text; use the 31-row worklist for corrected text or a better
crop recognizer, then insert with candidate-document order.
Further ablation says this is not just a bad subset choice. No reference-span group or
single row among the 31 improves both page codepoint and page grapheme CER under
candidate-document order. However, an oracle reference-order ceiling over the same
exact 31 rows drops page codepoint CER to 0.102355 and grapheme CER to 0.136823
with line F1 0.933566 and 0 effect-audit issues. The product path is therefore
layout/reading-order learning for full page assembly, not more detector thresholding.
tools/analyze_page_reading_order_geometry.py now turns that oracle order into a
21-chunk geometry target, showing that the missing deployable policy is article/block
ordering rather than a single column-major sort.
tools/apply_page_reading_order_geometry_profile.py is the current bridge from that
diagnostic target to an operationalizable mechanism: it applies a chunk profile to a
page-document projection and reorders lines by assigned profile chunk. With the
oracle-derived 21-chunk profile, the 31-row oracle-text projection scores codepoint CER
0.095711 and grapheme CER 0.129700; the same profile applied to non-oracle machine
candidate text scores codepoint CER 0.143146, grapheme CER 0.198112, line F1
0.933566, recall 0.881188, misses 36, extras 2, and reading-order accuracy 1.0.
The effect audit passes, but this is still not claim-safe or deployable because the
profile itself came from hidden eval alignment. The next real work is replacing that
oracle-derived profile with a reviewed/calibrated layout profile derived from page
images, templates, or observable article/block structure.
tools/build_page_reading_order_geometry_profile.py now provides that replacement
path for geometry review: it consumes geometry-only line-box application references,
rejects transcription text by default, requires explicit --allow-pending for seed
packets, and requires explicit --allow-multi-source-profile before mixing layouts.
On the current pending Sirijonga line-box packet, applying the packet as seed geometry
produces 2 samples and 389 line boxes. The separate pending Gorkhapatra seed profile
has 303 lines, 26 chunks, 25 jumps, and profile_claim_safe=false; when applied to
the same 31-row machine-text candidate projection it scores exactly like the
oracle-derived profile-order machine run: codepoint CER 0.143146, grapheme CER
0.198112, line F1 0.933566, recall 0.881188, misses 36, extras 2, and
reading-order accuracy 1.0. This is important directionally but not operationally
safe yet: the rows are still pending, so the next required work is to complete the
geometry review and rebuild the profile without --allow-pending.
Use tools/audit_page_reading_order_geometry_profile.py --require-claim-safe before
promotion, and apply profiles in operational runs with
tools/apply_page_reading_order_geometry_profile.py --require-profile-claim-safe.
The current pending Gorkhapatra seed profile passes structural audit but fails
required-safe audit and is refused by the applier under that flag. This prevents
hidden-alignment or pending-review profiles from leaking into selected book OCR.
tools/admit_page_reading_order_profile_application.py is the final promotion gate for
profile-ordered page projections: it requires a safe profile audit, a profile
application report using the same profile hash, and a safe page objective effect audit.
On the current pending Gorkhapatra seed-profile projection, admission correctly rejects
the run despite the strong score because provenance is not safe (admitted_operational=false,
admission SHA-256 02bcd20dc1a5598f92b9a251dd5ae4669171ba8d9429df4eb9c06cf33bc354b6).
For multi-page books, use --profile-map rather than one global --profile. The
current pending seed map at
outputs/limbu-sirijonga-line-box-review-packet-2026-06-21-pending-seed-profile-map.json
maps Gorkhapatra and Sikkim pages to separate profiles. A map-driven Gorkhapatra
diagnostic reproduces the same metrics as the single-profile run while recording the
selected profile in profile_usage; admission still rejects it because the profile is
pending. tools/audit_page_reading_order_profile_map.py audits map coverage and
profile-audit linkage; the current map passes structural audit but fails required-safe
audit because the mapped profiles are pending. This is the safe shape for future
multi-page reviewed layouts: profile map -> profile-map audit -> required-safe
application -> effect audit -> admission.
tools/parse_limbu_book_pages.py can now apply that profile map inside the book run
with --reading-order-profile-map. It applies the map after optional line assembly and
before book.md, book.body.md, review queues, and score-documents/ are written, so
editable text and scoring use the same reordered document projection. Operational runs
can add --require-reading-order-profile-safe and
--require-reading-order-profile-map-safe to refuse unsafe profiles/maps. The book
wrapper now also treats a map audit as evidence for one exact map: supplied audits must
record the current map SHA-256, and --require-reading-order-profile-map-safe fails if
no --reading-order-profile-map-audit is supplied. tools/audit_limbu_book_output.py
now checks the profile-map hash, profile application report, assignments JSONL,
optional map audit, and per-page profile source documents, so stale profile-order
artifacts fail the normal book bundle audit.