ocr-projects-archive / ocr-tech /docs /SYNTHESIS_RESOURCE_AUDIT.md
prosperious's picture
Add 1000 files (OCR_INDRA/.gitignore ...)
f9bc0c1 verified
|
Raw History Blame Contribute Delete
66.6 kB

Synthesis Resource Audit

Synthetic OCR data is allowed for training and ablations only. Before rendering synthetic images, every source corpus must have an inventory record and then a schema-specific converter. Do not infer column names or text fields from path names.

Command

uv run ocrtech audit-synthesis-resources \
  --root /Users/cdjk/github/llm/ltk/limbu --label ltk-limbu \
  --root /Users/cdjk/github/llm/ltk/tamang --label ltk-tamang \
  --root /Users/cdjk/github/llm/ltk/magar --label ltk-magar \
  --root /Users/cdjk/github/llm/ltk --label ltk-all \
  --out outputs/synthesis-resource-audit-ltk \
  --max-text-samples-per-root 30 \
  --sample-bytes 64000

The command writes:

  • synthesis-resource-audit.json
  • synthesis-resource-audit.md

The audit records file counts, total size, suffix counts, sampled text-file hashes, and Unicode block counts. It is an inventory gate, not a schema approval gate.

Synthesis Text Manifest Gate

After a schema-specific converter emits synthesis text JSONL and before any rendering or training, run:

uv run ocrtech audit-synthesis-text-manifest \
  data/synthesis-text/limbu-unicode/limbu-unicode-text.jsonl \
  --out outputs/limbu-unicode-text-audit \
  --require-language limbu \
  --require-script Limbu \
  --min-samples 1

The command writes:

  • synthesis-text-manifest-audit.json
  • synthesis-text-manifest-audit.md

This gate checks required synthesis-text fields, text SHA-256, Unicode block counts, source schema provenance, language/script presence, license status, synthesis_training_candidate=true, and claim_evidence_eligible=false. Synthetic text rows that fail this audit must not be rendered or used for training.

Checklist for each remote synthesis path:

  • Inventory candidate resource roots with audit-synthesis-resources.
  • Verify the actual file schema and write or reuse a schema-specific converter.
  • Convert real text into synthesis-text JSONL with source path/SHA and text SHA.
  • Run audit-synthesis-text-manifest with required language/script gates.
  • Render line images only from passed synthesis-text manifests.
  • Run audit-rendered-synthesis-lines before PaddleOCR label use.
  • Keep license review separate from OCR accuracy claims; pending-review data is training-candidate only and not publication evidence.

Targeted Limbu Fabrication Pipeline

Run date: 2026-06-24.

Use this path when a recognizer has already failed on real/silver data and the next synthetic data should target those failures. Do not use it as generic corpus inflation. Inputs must be verified text sources plus explicit failure/width artifacts:

  • synthesis text JSONL such as data/synthesis-text/cdjk-limbu-prose-2026-06-16/limbu-prose-text.jsonl and data/synthesis-text/cdjk-limbu-limdic-2026-06-16/filtered/limbu-only.jsonl;
  • current recognizer error artifacts such as outputs/limbu-combined-synth-real-gorkhapatra-v1-15ep-normedit-best-eval-2026-06-23/score/worst-lines.csv and .../score/confusions.json;
  • a real line-crop width profile, currently outputs/limbu-gorkhapatra-pdf-backed-silver-2026-06-23-v3/splits/train.jsonl;
  • verified renderable fonts, currently upstream Namdhinggo TTFs from data/fonts/namdhinggo/Namdhinggo-3.100/.

Do not use the extracted Gorkhapatra PDF subset fonts for this generator. The files exist, but the 1237-UFNWLJ_NamdhinggoSILL*.ttf variants generated blank crops through Pillow/RAQM because they do not expose a usable Unicode render path. The generator now rejects such fonts before rendering and also rejects any crop whose post-degradation ink count is too low.

Generation command:

uv run python tools/build_limbu_targeted_fabrication_pack.py \
  --text-jsonl data/synthesis-text/cdjk-limbu-prose-2026-06-16/limbu-prose-text.jsonl \
  --text-jsonl data/synthesis-text/cdjk-limbu-limdic-2026-06-16/filtered/limbu-only.jsonl \
  --hard-lines-csv outputs/limbu-combined-synth-real-gorkhapatra-v1-15ep-normedit-best-eval-2026-06-23/score/worst-lines.csv \
  --confusions-json outputs/limbu-combined-synth-real-gorkhapatra-v1-15ep-normedit-best-eval-2026-06-23/score/confusions.json \
  --width-profile-manifest outputs/limbu-gorkhapatra-pdf-backed-silver-2026-06-23-v3/splits/train.jsonl \
  --out outputs/limbu-targeted-fabrication-v1-2026-06-24 \
  --max-lines 5000 \
  --variants-per-line 2 \
  --profile phone_photo \
  --seed 24

Result:

schema=ocrtech.limbu-targeted-fabrication-pack.v1
train images=9996
base selected lines=5000
render rejects=4
source records loaded=19064
width-profile rows=1866
font split=2563 Regular / 2469 Medium / 2427 SemiBold / 2537 Bold
rendered width min/p50/max=89/608/2460
rendered height min/p50/max=32/61/147
dark-pixel min/p50/max=28/2082/113592
min-gray min/p50/max=0/16/129

The tool writes:

  • images/*.png
  • labels/train.txt
  • manifests/train.jsonl
  • dictionary.txt
  • rejects.jsonl
  • targeted-fabrication-summary.json
  • targeted-fabrication-summary.md

Every manifest row must remain claim_evidence_eligible=false; this component is training-only. Promote it only through a real/silver held-out recognizer ablation.

Combined recognizer pack command:

uv run python tools/build_limbu_combined_recognizer_pack.py \
  --out outputs/limbu-combined-synth-real-gorkhapatra-targeted-v1-2026-06-24 \
  --targeted-fabrication-train-manifest outputs/limbu-targeted-fabrication-v1-2026-06-24/manifests/train.jsonl

Combined result:

train rows=58467
eval rows=255
targeted-fabrication rows kept after eval-overlap drop=9960
exact eval-text overlap drops=49
train audit passed=True
eval audit passed=True

Limbu Unicode Coverage Supplement

Run date: 2026-06-24.

Before generating this supplement, run the Unicode and corpus-order analysis documented in docs/LIMBU_UNICODE_DIACRITIC_STATS.md. The important finding is that Namdhinggo renders every tested Limbu component order cleanly, so font shaping is not a grammar oracle. The current combined corpus also used only 61/68 assigned Limbu codepoints.

Corpus-stat command:

uv run python tools/analyze_limbu_unicode_corpus_stats.py \
  --manifest outputs/limbu-combined-synth-real-gorkhapatra-targeted-v1-2026-06-24/train.jsonl \
  --manifest outputs/limbu-combined-synth-real-gorkhapatra-targeted-v1-2026-06-24/eval.jsonl \
  --out outputs/limbu-unicode-corpus-stats-v1-2026-06-24 \
  --top-n 80

Pre-coverage result:

rows=58722
Limbu chars=2241565
covered codepoints=61/68
missing=U+1909,U+190A,U+191A,U+191D,U+191E,U+1932,U+1940
NFC-changed rows=0
NFD-changed rows=0

Coverage text generation:

uv run python tools/build_limbu_unicode_coverage_text.py \
  --baseline-manifest outputs/limbu-combined-synth-real-gorkhapatra-targeted-v1-2026-06-24/train.jsonl \
  --out-jsonl data/synthesis-text/limbu-sirijonga-unicode-coverage-v1-2026-06-24/coverage-text.jsonl \
  --target-count 1000 \
  --planned-render-variants 2 \
  --targets-per-line 3 \
  --seed 240624

The generator is intentionally conservative:

  • subjoined letters are emitted before vowel signs;
  • long closed syllables use base+vowel+KEMPHRENG+final;
  • generated context avoids final+sign;
  • U+1932 Limbu small letter anusvara is handled as a final, not as a standalone mark.

Coverage text result:

rows=1936
corpus-stat warning_counts={}
NFC-changed rows=0
NFD-changed rows=0

Render command:

uv run python tools/build_limbu_targeted_fabrication_pack.py \
  --text-jsonl data/synthesis-text/limbu-sirijonga-unicode-coverage-v1-2026-06-24/coverage-text.jsonl \
  --width-profile-manifest outputs/limbu-gorkhapatra-pdf-backed-silver-2026-06-23-v3/splits/train.jsonl \
  --out outputs/limbu-unicode-coverage-fabrication-v1-2026-06-24 \
  --max-lines 0 \
  --variants-per-line 2 \
  --profile mixed \
  --seed 240625 \
  --force

Rendered result:

rendered rows=3872
render rejects=0
dark-pixel min/p50/max=33/1880/49435
min-gray min/p50/max=0/16/124

Combined pack command with this supplement:

uv run python tools/build_limbu_combined_recognizer_pack.py \
  --out outputs/limbu-combined-synth-real-gorkhapatra-targeted-unicode-v1-2026-06-24 \
  --targeted-fabrication-train-manifest outputs/limbu-targeted-fabrication-v1-2026-06-24/manifests/train.jsonl \
  --unicode-coverage-fabrication-train-manifest outputs/limbu-unicode-coverage-fabrication-v1-2026-06-24/manifests/train.jsonl \
  --seed 240626

Combined result:

train rows=62339
eval rows=255
unicode-coverage-fabrication rows=3872
train audit passed=True
eval audit passed=True
covered codepoints after coverage=68/68
under-1000 assigned codepoints after coverage=none

This supplement is training-only. It must remain a separate component named unicode-coverage-fabrication-v1 so it can be ablated against held-out real/silver evals.

Local LTK Audit

Run date: 2026-06-16.

passed=True roots=4/4 files=52926 warnings=0
Label Files Size Text files Structured files Fonts Documents
ltk-limbu 21,386 223,687,959 bytes 730 720 4 0
ltk-tamang 14 66,375,078 bytes 7 9 0 4
ltk-magar 8 2,245,959 bytes 4 2 0 4
ltk-all 31,518 497,650,173 bytes 946 921 5 10

High-signal sampled files:

  • Limbu:
    • data/limdic_dictionary.json: Limbu + Devanagari observed in sample.
    • data/limdic_firebase.json: Limbu + Devanagari observed in sample.
    • data/limdic_dictionary.tsv: Limbu + Devanagari observed in sample.
    • data/pangloss_igt_corpus.tsv: mostly Latin/annotation text in sample.
    • data/pangloss_annotations/*.xml: Pangloss XML annotation candidates.
  • Tamang:
    • data/neptam80k_synthetic.csv: Devanagari observed in sample.
    • data/neptam_train.csv: Devanagari observed in sample.
    • data/neptam_test.csv: Devanagari observed in sample.
    • data/western_tamang_dictionary.tsv: Devanagari observed in sample.
    • data/tts_lexicon.tsv: Devanagari observed in sample.
  • Magar:
    • data/western_magar_dictionary.tsv: Devanagari observed in sample.
    • data/western_magar_dictionary.json: Devanagari observed in sample.
    • data/western_magar_raw_entries.txt: Devanagari observed in sample.

Current interpretation:

  • Limbu has enough source material to build a first Limbu/Sirijonga synthetic text converter, but the converter must inspect actual JSON/TSV/XML schemas.
  • Tamang has explicit train/test CSVs and dictionaries, but neptam80k is already synthetic text and must be labeled as synthetic-source text if used.
  • Magar has dictionary-style text only; it can seed character/word coverage but is not enough for document-language modeling without additional real text.

Limbu/Sirijonga Font Source

Namdhinggo is now tracked as the preferred Sirijonga font source for Limbu OCR synthesis. SIL's product page describes Namdhinggo as a Unicode Limbu font for the full Limbu block U+1900..U+194F plus basic Latin, licensed under the SIL Open Font License. The current package verified for this repo is Namdhinggo-3.100.zip from https://software.sil.org/namdhinggo/.

The reproducible source of truth is now configs/namdhinggo-font-assets-v1.json, which extracts selected archive members from the upstream GitHub release ZIP and verifies both package SHA-256 and extracted-member SHA-256 values.

Provisioning command:

uv run ocrtech prepare-font-assets \
  configs/namdhinggo-font-assets-v1.json \
  --out outputs/font-assets-namdhinggo-2026-06-16

Result:

passed=True assets=10 downloaded=0 reused=10 failed=0

Verified runtime files:

  • Package: /tmp/Namdhinggo-3.100.zip, SHA-256 073369fbaf064f9075bfbc65e1a76776f449a280c4c367f3cb560bebf70b3915
  • Regular TTF: data/fonts/namdhinggo/Namdhinggo-3.100/Namdhinggo-Regular.ttf, SHA-256 1b46b16277e4b6784bd19306a9474281888b656e9c57233b4e7dc63bd1229d6c
  • OFL text: data/fonts/namdhinggo/Namdhinggo-3.100/OFL.txt, SHA-256 64df695392d8facd1ed4b35e7158f9957073741c7f76c252c7423d5aae699cee

Font readiness command:

uv run ocrtech audit-font-asset-readiness \
  configs/namdhinggo-font-assets-v1.json \
  outputs/font-assets-namdhinggo-2026-06-16/font-assets-preparation.json \
  outputs/font-inventory-all-runtime-fonts-2026-06-16/font-inventory.json \
  outputs/font-renderability-all-scripts-google-fonts-2026-06-16/font-renderability-audit.json \
  --out outputs/font-asset-readiness-namdhinggo-2026-06-16

Result:

passed=True assets=10 checked=10 issues=0

SIL also links legacy Namdhinggo SIL L and Devanagari-to-Limbu conversion maps. Those are useful leads for normalizing older Limbu material, but converted text must still pass source-schema, license, Unicode, and leakage audits before entering synthesis.

Limbu/Sirijonga Split-Safe Render Smoke

Run date: 2026-06-16.

The verified outputs/limbu-unicode-text-smoke-2026-06-16/limbu-unicode-text.jsonl manifest contains 200 Limbu rows: 177 pure Limbu/Sirijonga rows and 23 mixed Limbu/Devanagari rows.

Split command:

uv run ocrtech split-synthesis-text \
  outputs/limbu-unicode-text-smoke-2026-06-16/limbu-unicode-text.jsonl \
  --out outputs/sirijonga-limbu-split-2026-06-16 \
  --eval-ratio 0.15 \
  --seed 17 \
  --group-by text_sha256

Result:

passed=True
train=170
eval=30
groups=200
split_policy=split_synthesis_text:text_sha256:seed=17:eval_ratio=0.15

Initial render command with macOS Noto Sans Limbu fallback:

uv run ocrtech render-synthesis-text-split \
  --train-manifest outputs/sirijonga-limbu-split-2026-06-16/train.jsonl \
  --eval-manifest outputs/sirijonga-limbu-split-2026-06-16/eval.jsonl \
  --out outputs/sirijonga-limbu-rendered-split-2026-06-16 \
  --font-path /System/Library/Fonts/Supplemental/NotoSansLimbu-Regular.ttf \
  --script Limbu \
  --require-font

Result:

passed=True
train=150
eval=27
train_audit=True
eval_audit=True
font_sha256=2c225a605c5a8aae3c05cf4e8aa710eedf3fa20d59578b1facb127e08ee47191
claim_evidence_eligible_count=0

The 23 mixed-script rows are intentionally excluded by --script Limbu. This rendered bundle is training/ablation data only, not paper claim evidence.

Preferred Namdhinggo render command:

uv run ocrtech render-synthesis-text-split \
  --train-manifest outputs/sirijonga-limbu-split-2026-06-16/train.jsonl \
  --eval-manifest outputs/sirijonga-limbu-split-2026-06-16/eval.jsonl \
  --out outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16 \
  --font-path data/fonts/namdhinggo/Namdhinggo-3.100/Namdhinggo-Regular.ttf \
  --script Limbu \
  --require-font

Result:

passed=True
train=150
eval=27
train_audit=True
eval_audit=True
font_sha256=1b46b16277e4b6784bd19306a9474281888b656e9c57233b4e7dc63bd1229d6c
claim_evidence_eligible_count=0

Readiness-gated rendered audits:

uv run ocrtech audit-rendered-synthesis-lines \
  outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/train/manifests/rendered-line-manifest.jsonl \
  --label-file outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/train/labels/train.txt \
  --require-font \
  --font-readiness-report outputs/font-asset-readiness-namdhinggo-2026-06-16/font-asset-readiness.json \
  --out outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/train-rendered-audit-font-ready

uv run ocrtech audit-rendered-synthesis-lines \
  outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/eval/manifests/rendered-line-manifest.jsonl \
  --label-file outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/eval/labels/eval.txt \
  --require-font \
  --font-readiness-report outputs/font-asset-readiness-namdhinggo-2026-06-16/font-asset-readiness.json \
  --out outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/eval-rendered-audit-font-ready

Result:

train: passed=True samples=150 claim_eligible=0 issues=0 warnings=0
eval:  passed=True samples=27 claim_eligible=0 issues=0 warnings=0

Rendered-line degradation support:

render-synthesis-text-lines and render-synthesis-text-split now accept repeatable --degradation-profile values:

clean
scan
low_light
uneven_light
glare_light
camera_left
camera_right
camera_top
camera_bottom
phone_photo

The renderer records degradation, degradation_profile, degradation_seed, and degradation_parameters in each manifest row and adds the profile to slices. This is training/ablation data only. Claims still need real Gorkhapatra/Naya Nepal page references, and split construction must group by text_sha256 so clean and degraded variants of the same label do not leak across train/eval.

Lighting-style profiles are now parameter-audited. low_light, uneven_light, glare_light, and phone_photo must record the numeric brightness/contrast, gradient/blend, or glare parameters that were actually used. Profile names alone are not accepted by audit-rendered-synthesis-lines.

Camera-style profiles are now geometry-audited. camera_left, camera_right, camera_top, camera_bottom, and phone_photo use a deterministic four-corner perspective transform rather than a plain shear. Their manifest rows must include:

degradation_parameters.camera_transform=perspective
degradation_parameters.source_quad
degradation_parameters.output_quad
degradation_parameters.perspective_coefficients

audit-rendered-synthesis-lines rejects lighting/camera-profile rows that omit this metadata. Regenerate older degraded rendered manifests before using them for any new training run.

Perspective camera smoke on 2026-06-16:

uv run ocrtech render-synthesis-text-lines \
  outputs/sirijonga-limbu-split-2026-06-16/train.jsonl \
  --out outputs/sirijonga-limbu-perspective-camera-smoke-2026-06-16 \
  --font-path data/fonts/namdhinggo/Namdhinggo-3.100/Namdhinggo-Regular.ttf \
  --script Limbu \
  --limit 3 \
  --degradation-profile clean \
  --degradation-profile camera_left \
  --degradation-profile phone_photo \
  --degradation-seed 31

uv run ocrtech audit-rendered-synthesis-lines \
  outputs/sirijonga-limbu-perspective-camera-smoke-2026-06-16/manifests/rendered-line-manifest.jsonl \
  --label-file outputs/sirijonga-limbu-perspective-camera-smoke-2026-06-16/labels/train.txt \
  --require-font \
  --font-readiness-report outputs/font-asset-readiness-namdhinggo-2026-06-16/font-asset-readiness.json \
  --out outputs/sirijonga-limbu-perspective-camera-smoke-audit-2026-06-16

Result:

render passed=True samples=3 skipped=0 warnings=0
audit passed=True samples=3 claim_eligible=0 issues=0 warnings=0
camera_left camera_transform=perspective camera_angle=left
phone_photo camera_transform=perspective camera_angle=left

Augmentation ablation promotion audit:

uv run ocrtech audit-augmentation-ablation \
  configs/limbu-sirijonga-augmentation-ablation-v1.json \
  --out outputs/limbu-sirijonga-augmentation-ablation-audit-current

Current result:

passed=False arms=3 real_evidence=0 verified_references=0 issues=1 warnings=0
issue=at least one real Gorkhapatra review audit is required before ablation promotion
clean passed=True train=150 eval=27
lighting passed=True train=450 eval=81
camera passed=True train=600 eval=108

This is the intended gate. The synthetic arms are internally auditable, but no trained ablation arm can be promoted until a passed Gorkhapatra language-page review audit with verified references is supplied via --real-review-audit.

Example augmentation command for the next Namdhinggo run:

uv run ocrtech render-synthesis-text-split \
  --train-manifest outputs/sirijonga-limbu-split-2026-06-16/train.jsonl \
  --eval-manifest outputs/sirijonga-limbu-split-2026-06-16/eval.jsonl \
  --out outputs/sirijonga-limbu-rendered-split-namdhinggo-augmented-2026-06-16 \
  --font-path data/fonts/namdhinggo/Namdhinggo-3.100/Namdhinggo-Regular.ttf \
  --script Limbu \
  --require-font \
  --font-readiness-report outputs/font-asset-readiness-namdhinggo-2026-06-16/font-asset-readiness.json \
  --degradation-profile clean \
  --degradation-profile low_light \
  --degradation-profile uneven_light \
  --degradation-profile camera_left \
  --degradation-profile camera_right \
  --degradation-profile phone_photo \
  --degradation-seed 29

Full Namdhinggo augmented split run:

passed=True train=900 eval=162 train_audit=True eval_audit=True

The bundle keeps each source text_sha256 on its original split side and emits six rendered variants per pure Limbu/Sirijonga text row:

train rows=900 unique_text_hashes=150 per_text_counts=[6]
eval rows=162 unique_text_hashes=27 per_text_counts=[6]
profiles={clean, low_light, uneven_light, camera_left, camera_right, phone_photo}
font_sha256=1b46b16277e4b6784bd19306a9474281888b656e9c57233b4e7dc63bd1229d6c

Augmentation split audit command:

uv run ocrtech audit-rendered-degradation-split \
  --train-manifest outputs/sirijonga-limbu-rendered-split-namdhinggo-augmented-2026-06-16/train/manifests/rendered-line-manifest.jsonl \
  --eval-manifest outputs/sirijonga-limbu-rendered-split-namdhinggo-augmented-2026-06-16/eval/manifests/rendered-line-manifest.jsonl \
  --expected-profile clean \
  --expected-profile low_light \
  --expected-profile uneven_light \
  --expected-profile camera_left \
  --expected-profile camera_right \
  --expected-profile phone_photo \
  --out outputs/sirijonga-limbu-rendered-split-namdhinggo-augmented-audit-2026-06-16

Result:

passed=True train=900 eval=162 train_texts=150 eval_texts=27 issues=0 warnings=0

Limbu/Sirijonga Augmentation Ablation Plan

The committed ablation spec is configs/limbu-sirijonga-augmentation-ablation-v1.json. It defines three training arms:

Arm Profiles Train Eval Status
clean clean 150 27 manifests, audit, and PaddleOCR recipe written
lighting clean, low_light, uneven_light 450 81 manifests, audit, and PaddleOCR recipe written
camera clean, camera_left, camera_right, phone_photo 600 108 manifests, audit, and PaddleOCR recipe written

The ablation manifests were derived with filter-manifest from the audited full Namdhinggo augmented split:

uv run ocrtech filter-manifest \
  outputs/sirijonga-limbu-rendered-split-namdhinggo-augmented-2026-06-16/train/manifests/rendered-line-manifest.jsonl \
  --out data/ablation-limbu-namdhinggo-augmented-v1/train-lighting.jsonl \
  --degradation clean \
  --degradation low_light \
  --degradation uneven_light

Each train/eval arm was then checked with audit-rendered-degradation-split. Results:

clean:    passed=True train=150 eval=27 train_texts=150 eval_texts=27 issues=0 warnings=0
lighting: passed=True train=450 eval=81 train_texts=150 eval_texts=27 issues=0 warnings=0
camera:   passed=True train=600 eval=108 train_texts=150 eval_texts=27 issues=0 warnings=0

PaddleOCR recipe generation succeeded for all three arms:

uv run ocrtech train-recognizer \
  --train-manifest data/ablation-limbu-namdhinggo-augmented-v1/train-camera.jsonl \
  --eval-manifest data/ablation-limbu-namdhinggo-augmented-v1/eval-camera.jsonl \
  --out runs/sirijonga-limbu-paddle-ablation-camera-v1 \
  --dictionary data/dictionaries/limbu-sirijonga-v1.txt \
  --train-batch-size 8 \
  --eval-batch-size 8 \
  --learning-rate 0.0001 \
  --epochs 1

This is still a recipe handoff, not a trained model. The broader Devanagari PP-OCRv3 mixed recognizer family has failed prior hard gates, so these PaddleOCR runs are allowed only as a narrow Limbu/Sirijonga augmentation ablation. Promotion requires manually reviewed real Gorkhapatra/Naya Nepal Limbu references and no broader document-pipeline regressions.

Tiny live smoke on the existing train split:

uv run ocrtech render-synthesis-text-lines \
  outputs/sirijonga-limbu-split-2026-06-16/train.jsonl \
  --out outputs/sirijonga-limbu-rendered-augmentation-smoke-2026-06-16 \
  --font-path data/fonts/namdhinggo/Namdhinggo-3.100/Namdhinggo-Regular.ttf \
  --script Limbu \
  --limit 6 \
  --degradation-profile clean \
  --degradation-profile low_light \
  --degradation-profile uneven_light \
  --degradation-profile camera_left \
  --degradation-profile phone_photo \
  --degradation-seed 29

uv run ocrtech audit-rendered-synthesis-lines \
  outputs/sirijonga-limbu-rendered-augmentation-smoke-2026-06-16/manifests/rendered-line-manifest.jsonl \
  --label-file outputs/sirijonga-limbu-rendered-augmentation-smoke-2026-06-16/labels/train.txt \
  --require-font \
  --font-readiness-report outputs/font-asset-readiness-namdhinggo-2026-06-16/font-asset-readiness.json \
  --out outputs/sirijonga-limbu-rendered-augmentation-smoke-audit-2026-06-16

Result:

render: passed=True samples=6 skipped=0 warnings=0
audit:  passed=True samples=6 claim_eligible=0 issues=0 warnings=0

Registry renderability audit with Namdhinggo included:

uv run ocrtech audit-font-renderability \
  languages/nepal-v1.json \
  --out outputs/font-renderability-audit-namdhinggo-2026-06-16 \
  --render-samples

Result: passed=True scripts=18 candidates=38 rendered=37. The Limbu / Sirijonga row reports Namdhinggo Regular exists, covers 100.0% of the registered Limbu range, and renders successfully.

Limbu/Sirijonga PaddleOCR Dictionary

The first Limbu/Sirijonga recognizer dictionary is now tracked at data/dictionaries/limbu-sirijonga-v1.txt. It contains the assigned characters in the Limbu Unicode block U+1900..U+194F plus the accepted punctuation needed by the current rendered labels. Label spaces are handled by PaddleOCR use_space_char=true rather than a fragile literal whitespace row in the dictionary file.

Audit command:

uv run ocrtech audit-paddle-dictionary \
  data/dictionaries/limbu-sirijonga-v1.txt \
  --out outputs/limbu-sirijonga-dictionary-audit-2026-06-16 \
  --required-range U+1900..U+194F \
  --label-file outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/train/labels/train.txt \
  --label-file outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/eval/labels/eval.txt

Result:

passed=True
chars=76
sha256=3bafb24bf4a492e47d372b3e554a5d4bf5383faeb3ef7cf48efa2c79f0a0d40b
required_range=U+1900..U+194F
required_characters=68
observed_label_characters=64
missing_required=0
missing_labels=0
warning=space label characters are covered by PaddleOCR use_space_char=true

PaddleOCR recipe smoke:

uv run ocrtech train-recognizer \
  --train-manifest outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/train/manifests/rendered-line-manifest.jsonl \
  --eval-manifest outputs/sirijonga-limbu-rendered-split-namdhinggo-2026-06-16/eval/manifests/rendered-line-manifest.jsonl \
  --out runs/sirijonga-limbu-paddle-recipe-smoke-2026-06-16 \
  --dictionary data/dictionaries/limbu-sirijonga-v1.txt \
  --train-batch-size 8 \
  --eval-batch-size 8 \
  --learning-rate 0.0001 \
  --epochs 1

This wrote runs/sirijonga-limbu-paddle-recipe-smoke-2026-06-16/paddle_recognizer.yml successfully, which means the training recipe's dictionary coverage check also accepts the current Namdhinggo-rendered labels. This is still a recipe smoke, not a trained model and not claim evidence.

Remote cdjk Leads

Remote host:

host: cdjk@100.110.148.43
password: agoodopensourceproject

The remote host did not have ~/github/llm/ocr-tech, so a source-only copy was synced to /tmp/ocr-tech. Use Homebrew Python; /usr/bin/python3 is too old for this repo's dataclass(slots=True) usage.

PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 - <<'PY'
from ocrtech.synthesis_resources import audit_synthesis_resources
...
PY

Direct SSH inventory on 2026-06-16 found:

~/github/llm/limbu-speech-toolkit      1.3G
~/github/llm/magar-toolkit              94M
~/github/llm/gurung-language-toolkit   143M
~/github/llm/dhimal-toolkit            136M
~/github/llm/rai-speech-toolkit        2.2G
~/github/llm/devanagari-OCR              0B
~/github/llm/ltk                       549M

/Volumes/TRANSCEND also contains likely useful language resources:

/Volumes/TRANSCEND/bible_brain_nepal/lif/LIFWBT_Limbu
/Volumes/TRANSCEND/bible_brain_nepal/thr/THRIEM_Tharu__Rana
/Volumes/TRANSCEND/bible_brain_nepal/gvr/GVRWBT_Gurung
/Volumes/TRANSCEND/bible_brain_nepal/dhi/DHIDPI_Dhimal
/Volumes/TRANSCEND/bible_brain_nepal/thl/THLWYI_Tharu__Dangaura
/Volumes/TRANSCEND/bible_brain_nepal/new/NEWNCL_Newari
/Volumes/TRANSCEND/bible_brain_nepal/taj/TAJWBT_Tamang__Eastern
/Volumes/TRANSCEND/nepali_dataset_prep/out*/nepali_train.tsv
/Volumes/TRANSCEND/noiseremover_nepal18_timed_pipeline/speaker_cluster_limbu

These paths are not yet schema-approved for OCR synthesis. They need the same audit-synthesis-resources command after repo sync, then schema-specific converters.

Remote Toolkit Audit

Run date: 2026-06-16.

output: /tmp/ocr-tech-remote-audits/toolkits
passed=True roots=6/6 files=38258 warnings=0
Label Files Size bytes Text files Structured files Fonts Documents
limbu-speech-toolkit 2,545 1,499,544,840 1,022 788 0 109
magar-toolkit 1,456 147,237,288 330 305 0 4
gurung-language-toolkit 1,026 146,704,833 607 35 0 8
dhimal-toolkit 342 142,100,154 49 39 0 6
rai-speech-toolkit 1,356 2,318,504,334 253 152 12 45
ltk 31,533 497,754,298 948 922 5 10

High-signal sampled files:

  • limbu-speech-toolkit
    • data/nmt_gold/train.jsonl
    • data/nmt/train.jsonl
    • data/dictionary/parallel_corpus_combined.tsv
    • data/nmt_goldmix/train.jsonl
  • magar-toolkit
    • data/mt-synth/train.jsonl
    • data/corpora/mgp-npi-nt.tsv
    • data/mt/train.jsonl
    • data/bibles/mgp_emgp/verses.tsv
  • gurung-language-toolkit
    • data/qa/silver.jsonl
    • data/parallel/bible_nep_gvr.jsonl
    • data/dataset/train.jsonl
    • data/parallel/bible_nep_gvr.tsv
  • dhimal-toolkit
    • data/corpus/dhimal_corpus.train.jsonl
    • data/mt/train.jsonl
    • data/corpus/dhimal_corpus.train.tsv
    • data/corpus/releases/dhimal_corpus.open.jsonl
  • rai-speech-toolkit
    • data/train/stage1_train.jsonl
    • data/corpus/bible.rai_crosspairs.jsonl
    • data/corpus/bible_nepali_rai.all.jsonl
    • data/train/train.jsonl

These are inventory-approved only. The sampled Unicode blocks show substantial Devanagari in the first chunks, but schema and license review still decide whether a file can become OCR synthesis text.

Remote 4TB SSD Audit

Run date: 2026-06-16.

output: /tmp/ocr-tech-remote-audits/transcend-language-corpora
passed=True roots=10/10 files=140845 warnings=0
Label Files Size bytes Text files Structured files
bb-limbu 1,336 794,411,508 1,047 1,047
bb-rana-tharu 2,201 1,394,401,861 1,046 1,046
bb-gurung 2,201 1,737,293,188 1,046 1,046
bb-dhimal 1,653 834,602,880 1,046 1,046
bb-dangaura-tharu 1,653 1,517,138,677 526 526
bb-newari 2,931 1,393,211,207 1,770 1,770
bb-eastern-tamang 1,653 804,339,688 1,046 1,046
nepali-prep-out 10,718 7,155,210,932 114 114
nepali-prep-out-next 13,582 10,214,521,961 46 46
nepali-prep-out-chirp2 102,917 22,248,445,400 1,668 1,668

High-signal sampled files:

  • Bible Brain language roots:
    • metadata/audio_manifest.jsonl
    • metadata/text_manifest.jsonl
    • text/*/*.json
  • Nepali prep roots:
    • nepali_train.tsv
    • transcripts/*_transcript.json

The Bible Brain roots are especially useful as aligned text/audio corpora for real-text OCR synthesis and later ASR/TTS cross-checks, but they require license review. Do not mix them into training until the converter records source license, language code, text field, and split policy.

Fresh read-only SSH check on 2026-06-16:

host: cdjk@100.110.148.43
machine: cdjks-MacBook-Pro.local
command: ssh cdjk@100.110.148.43 'ls/find/df only'
disk: /Volumes/TRANSCEND, 3.6Ti total, 1.7Ti used, 2.0Ti available

Confirmed ~/github/llm leads:

  • dhimal-toolkit
  • gurung-language-toolkit
  • limbu-speech-toolkit
  • ltk
  • magar-toolkit
  • nepa-newa-text-frontend
  • nepal-tts-training
  • rai-speech-toolkit

Confirmed /Volumes/TRANSCEND leads:

  • /Volumes/TRANSCEND/bible_brain_nepal/lif/LIFWBT_Limbu
  • /Volumes/TRANSCEND/bible_brain_nepal/thr/THRIEM_Tharu__Rana
  • /Volumes/TRANSCEND/bible_brain_nepal/gvr/GVRWBT_Gurung
  • /Volumes/TRANSCEND/bible_brain_nepal/dhi/DHIDPI_Dhimal
  • /Volumes/TRANSCEND/bible_brain_nepal/rjs/RJSMTS_Rajbanshi
  • /Volumes/TRANSCEND/bible_brain_nepal/suz/SUZWBT_Sunuwar
  • /Volumes/TRANSCEND/bible_brain_nepal/thl/THLWYI_Tharu__Dangaura
  • /Volumes/TRANSCEND/bible_brain_nepal/new/NEWNCL_Newari
  • /Volumes/TRANSCEND/bible_brain_nepal/rav/RAVFUL_Sampang
  • /Volumes/TRANSCEND/bible_brain_nepal/taj/TAJWBT_Tamang__Eastern
  • /Volumes/TRANSCEND/bible_brain_nepal/kle/KLENLI_Kulung
  • /Volumes/TRANSCEND/bible_brain_nepal/xsr/XSRXSR_Sherpa
  • /Volumes/TRANSCEND/bible_brain_nepal/npi/NPIBIB_Nepali
  • /Volumes/TRANSCEND/bible_brain_nepal/npi/NPIDPI_Nepali
  • /Volumes/TRANSCEND/nepali_dataset_prep/out*/
  • /Volumes/TRANSCEND/noiseremover_nepal18_timed_pipeline/bible_brain/*
  • /Volumes/TRANSCEND/noiseremover_nepal18_timed_pipeline/speaker_cluster_limbu

Next Converters

Build converters in this order:

  1. Limbu limdic_dictionary.{json,tsv} and limdic_firebase.json.
  2. Limbu Pangloss TSV/XML extraction with explicit field verification.
  3. Remote toolkit JSONL/TSV corpora for Magar, Gurung, Dhimal, Rai, and Limbu after schema checks.
  4. Remote Bible Brain text/audio-aligned resources only after license and schema checks.
  5. Large Nepali prep TSV/transcript roots for Nepali preservation and Devanagari robustness after dedupe/leakage checks.

Every converter must write text hashes, source paths, language/script labels, Unicode block counts, and a source_schema_verified=true flag only after fixtures prove the actual schema.

Implemented converter status:

  • Limbu Limdic JSON/TSV/Firebase converter.
  • Bible Brain metadata/text_manifest.jsonl converter for text_plain verse JSON and nested Sofria text_json chapter JSON.
  • Limbu/Sirijonga Unicode plaintext and tagged sentence TSV converter.
  • Tamang NepTam CSV and Western Tamang dictionary TSV/JSON converter.
  • Magar Western dictionary TSV/JSON converter.
  • Explicit-field toolkit JSONL/TSV/CSV converter for remote parallel corpora.
  • Limbu Pangloss TSV/XML converter.
  • Nepali prep TSV/transcript converter.

Synthesis Path Checklist

Use this checklist before adding any remote corpus to OCR synthesis:

  • Verify the cdjk remote path exists with read-only SSH, not by memory.
  • Record the host, disk, and inspected paths in this document.
  • Run ocrtech audit-synthesis-resources on each selected remote root after syncing or executing the source-only repo copy on cdjk.
  • For each candidate language, inspect the actual JSON/TSV/XML/CSV schema and add a schema fixture before writing a converter.
  • Record license status per source. Bible Brain and derived speech/text resources remain pending_review until explicitly cleared.
  • Assign language, script, Unicode block, source path, source SHA-256, text SHA-256, and split policy to every emitted text row.
  • Deduplicate against real validation references and current training text before rendering synthetic OCR lines/pages.
  • Verify renderability with actual fonts for each script. Limbu/Sirijonga is first; Devanagari language variants can share Devanagari font coverage only after Unicode audit.
  • Render OCR training images only from schema-approved text manifests.
  • Audit rendered-line/page manifests with image hashes, label checks, font hashes, and claim_evidence_eligible=false.
  • Keep all Gorkhapatra/Naya Nepal epaper pages as real validation candidates, not synthetic training sources, unless a separate licensing and split decision explicitly allows training use.

Remote Toolkit Parallel Converter

Implemented command:

uv run ocrtech prepare-toolkit-parallel-text \
  --source /path/to/toolkit/train.jsonl \
  --text-field mgp=magar \
  --text-field npi=nepali \
  --row-id-field id \
  --metadata-field source \
  --out outputs/toolkit-parallel-text-smoke

The converter is intentionally explicit. It does not infer language labels from directory names or column names. Each text-bearing field must be declared as FIELD=language, and the command fails if any declared text, row-id, or metadata field is absent from the actual JSONL/TSV/CSV schema.

Supported source formats:

  • JSONL object rows.
  • TSV rows with a header.
  • CSV rows with a header.

Remote schemas sampled over SSH on 2026-06-16 that this command can cover:

  • Magar toolkit JSONL: mgp, npi, id.
  • Magar toolkit TSV: verse_id, mgp, npi.
  • Gurung toolkit JSONL/TSV-style fields: nep, gvr, ref, source.
  • Dhimal toolkit JSONL: nepali, dhimal, ref, source, license.
  • Rai toolkit JSONL: input, target, dialect or src, tgt, ref, source.
  • Limbu toolkit JSONL/TSV: src, tgt, src_lang, tgt_lang or limbu, tgt_text, tier, source, confidence, script.

Example remote commands after syncing or using the source-only repo copy:

PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli prepare-toolkit-parallel-text \
  --source /Users/cdjk/github/llm/magar-toolkit/data/mt/train.jsonl \
  --text-field mgp=magar \
  --text-field npi=nepali \
  --row-id-field id \
  --out /tmp/ocr-tech-remote-audits/magar-toolkit-parallel-text
PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli prepare-toolkit-parallel-text \
  --source /Users/cdjk/github/llm/gurung-language-toolkit/data/dataset/train.jsonl \
  --text-field gvr=gurung \
  --text-field nep=nepali \
  --row-id-field ref \
  --metadata-field source \
  --metadata-field kind \
  --out /tmp/ocr-tech-remote-audits/gurung-toolkit-parallel-text
PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli prepare-toolkit-parallel-text \
  --source /Users/cdjk/github/llm/dhimal-toolkit/data/corpus/dhimal_corpus.train.jsonl \
  --text-field dhimal=dhimal \
  --text-field nepali=nepali \
  --row-id-field ref \
  --metadata-field source \
  --metadata-field license \
  --out /tmp/ocr-tech-remote-audits/dhimal-toolkit-parallel-text

After conversion, run audit-synthesis-text-manifest with the expected language/script gates before rendering any OCR samples. These converted rows remain training/ablation candidates only and carry claim_evidence_eligible=false.

For full promotion beyond smoke tests, split the synthesis text deterministically before rendering:

uv run ocrtech split-synthesis-text \
  outputs/toolkit-parallel-text-smoke/toolkit-parallel-text.jsonl \
  --out outputs/toolkit-parallel-text-split \
  --eval-ratio 0.15 \
  --seed 17 \
  --group-by text_sha256 \
  --exclude data/eval-pack/manifests/ocrtech-eval-pack.jsonl \
  --exclude data/gorkhapatra-language-pages/references

The splitter writes:

  • train.jsonl
  • eval.jsonl
  • synthesis-text-split-summary.json
  • synthesis-text-split-summary.md
  • train-promotion-audit/
  • eval-promotion-audit/

It keeps rows with the same text_sha256 on the same side of the split, stamps metadata.split_policy, and runs audit-synthesis-text-promotion on both outputs. The eval-side promotion audit also excludes the generated train split, so text overlap across synthetic train/eval fails before rendering.

Remote split smoke on 2026-06-16:

export PYTHONPATH=/tmp/ocr-tech/src
PY=/opt/homebrew/bin/python3
BASE=/tmp/ocr-tech-remote-audits/magar-toolkit-split-smoke-2026-06-16

$PY -m ocrtech.cli prepare-toolkit-parallel-text \
  --source /Users/cdjk/github/llm/magar-toolkit/data/mt/train.jsonl \
  --text-field mgp=magar \
  --text-field npi=nepali \
  --row-id-field id \
  --out $BASE/prepared \
  --limit-per-source 20

$PY -m ocrtech.cli split-synthesis-text \
  $BASE/prepared/toolkit-parallel-text.jsonl \
  --out $BASE/split \
  --eval-ratio 0.25 \
  --seed 17 \
  --group-by text_sha256

Result:

prepare passed=True samples=20 duplicates=0 warnings=0
split passed=True train=15 eval=5 groups=20
split_policy=split_synthesis_text:text_sha256:seed=17:eval_ratio=0.25
train_promotion=True eval_promotion=True eval_overlap_count=0

For a one-off manifest that is not being split, run the promotion gate directly before rendering:

uv run ocrtech audit-synthesis-text-promotion \
  outputs/toolkit-parallel-text-promoted-candidate/toolkit-parallel-text.jsonl \
  --out outputs/toolkit-parallel-text-promotion-audit \
  --exclude data/eval-pack/manifests/ocrtech-eval-pack.jsonl \
  --exclude data/gorkhapatra-language-pages/references

audit-synthesis-text-promotion first runs the basic synthesis-text manifest audit, then requires metadata.split_policy, fails on any text-hash overlap with excluded synthesis manifests, OCR manifests, reference JSON files, Markdown/text references, or directories, and optionally enforces reviewed license status:

uv run ocrtech audit-synthesis-text-promotion \
  outputs/toolkit-parallel-text-promoted-candidate/toolkit-parallel-text.jsonl \
  --out outputs/toolkit-parallel-text-promotion-audit \
  --exclude data/eval-pack/manifests/ocrtech-eval-pack.jsonl \
  --require-reviewed-license

Use --require-reviewed-license only when a source is intended for publication-grade or long-running training, not for early schema smoke tests. Rows with pending_review licenses may still be useful for ablation planning, but they must not become paper evidence.

Remote promotion smoke on 2026-06-16:

export PYTHONPATH=/tmp/ocr-tech/src
PY=/opt/homebrew/bin/python3
BASE=/tmp/ocr-tech-remote-audits/magar-toolkit-promotion-smoke-2026-06-16

$PY -m ocrtech.cli prepare-toolkit-parallel-text \
  --source /Users/cdjk/github/llm/magar-toolkit/data/mt/train.jsonl \
  --text-field mgp=magar \
  --text-field npi=nepali \
  --row-id-field id \
  --split-policy hash_by_text_sha256_seed_17_train \
  --out $BASE/manifest \
  --limit-per-source 6

$PY -m ocrtech.cli audit-synthesis-text-promotion \
  $BASE/manifest/toolkit-parallel-text.jsonl \
  --out $BASE/promotion-audit

Result:

prepare passed=True samples=6 duplicates=0 warnings=0
promotion passed=True samples=6 overlaps=0 issues=0 warnings=0
split_policy_counts={'hash_by_text_sha256_seed_17_train': 6}

This remote smoke proves the promotion command runs on cdjk and verifies split policy metadata. It does not prove exclusion-set cleanliness because no held-out manifest or reference directory was supplied in this small smoke.

Remote smoke on 2026-06-16:

PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli prepare-toolkit-parallel-text \
  --source /Users/cdjk/github/llm/magar-toolkit/data/mt/train.jsonl \
  --text-field mgp=magar \
  --text-field npi=nepali \
  --row-id-field id \
  --out /tmp/ocr-tech-remote-audits/magar-toolkit-parallel-text-smoke-2026-06-16 \
  --limit-per-source 6

PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli audit-synthesis-text-manifest \
  /tmp/ocr-tech-remote-audits/magar-toolkit-parallel-text-smoke-2026-06-16/toolkit-parallel-text.jsonl \
  --out /tmp/ocr-tech-remote-audits/magar-toolkit-parallel-text-smoke-audit-2026-06-16 \
  --require-language magar \
  --require-language nepali \
  --require-script Devanagari \
  --min-samples 6

Result:

prepare passed=True samples=6 duplicates=0 warnings=0
audit passed=True samples=6 claim_eligible=0 issues=0 warnings=0
language_counts={'magar': 3, 'nepali': 3}
script_counts={'Devanagari': 6}

The first remote attempt failed because /tmp/ocr-tech had a stale source-only checkout whose references.py did not match the newer CLI imports. The full src/ocrtech tree was resynced before rerunning the smoke.

Remote batch smoke on 2026-06-16:

export PYTHONPATH=/tmp/ocr-tech/src
PY=/opt/homebrew/bin/python3
BASE=/tmp/ocr-tech-remote-audits/toolkit-parallel-batch-smoke-2026-06-16

The batch used explicit mappings only:

Language path Source Text fields Row id Metadata
Gurung /Users/cdjk/github/llm/gurung-language-toolkit/data/dataset/train.jsonl gvr=gurung, nep=nepali ref source, kind
Dhimal /Users/cdjk/github/llm/dhimal-toolkit/data/corpus/dhimal_corpus.train.jsonl dhimal=dhimal, nepali=nepali ref source, license
Rai /Users/cdjk/github/llm/rai-speech-toolkit/data/train/train.jsonl target=rai row number dialect
Limbu /Users/cdjk/github/llm/limbu-speech-toolkit/data/dictionary/parallel_corpus_combined.tsv limbu=limbu row number tier, source, confidence, script

Result:

Path Prepare result Audit result Language counts Script counts Claim eligible
Gurung passed=True samples=10 duplicates=0 warnings=0 passed=True issues=0 warnings=0 gurung=5, nepali=5 Devanagari=10 0
Dhimal passed=True samples=10 duplicates=0 warnings=0 passed=True issues=0 warnings=0 dhimal=5, nepali=5 Devanagari=10 0
Rai passed=True samples=10 duplicates=0 warnings=0 passed=True issues=0 warnings=0 rai=10 Devanagari=10 0
Limbu passed=True samples=10 duplicates=9 warnings=0 passed=True issues=0 warnings=0 limbu=10 Devanagari=10 0

Interpretation:

  • The explicit-field converter works on real remote toolkit JSONL and TSV schemas for four additional language paths.
  • These smoke manifests are synthesis-training candidates only. They are not deduped against validation references and are not paper evidence.
  • The Limbu toolkit TSV smoke is Devanagari-script Limbu text. It helps Limbu language modeling and Devanagari OCR robustness but does not satisfy the Limbu/Sirijonga non-Devanagari goal.
  • Rai is currently labeled as broad rai because the sampled training file carries dialect=aph. Claim-grade registry mapping must split this into the correct Rai language/variety before final evaluation.

Magar Text Converter

Implemented command:

uv run ocrtech prepare-magar-text \
  --source /Users/cdjk/github/llm/ltk/magar/data/western_magar_dictionary.tsv \
  --source /Users/cdjk/github/llm/ltk/magar/data/western_magar_dictionary.json \
  --out outputs/magar-text-smoke-2026-06-16 \
  --limit-per-source 100 \
  --min-text-chars 1

Verified local schemas on 2026-06-16:

  • Western Magar dictionary TSV/JSON: headword, ipa, pos, variant, and definition.

The converter emits magar-text.jsonl in the synthesis-text schema with language=magar, source path/SHA, text SHA, Unicode block counts, source_schema_verified=true, license_status=pending_review, synthesis_training_candidate=true, and claim_evidence_eligible=false.

Live local smoke on 2026-06-16:

passed=True samples=200 duplicates=109 warnings=0
rejected=145
fields={'definition': 98, 'headword': 98, 'variant': 4}
scripts={'Devanagari': 131, 'Latin': 1, 'Mixed_Devanagari_Latin': 67, 'Other': 1}

The Magar source is lexicon-heavy and contains mixed/Latin annotation noise, so it is useful for synthesis coverage and dictionary/character expansion, not as a standalone Magar OCR claim.

Guardrail audit:

uv run ocrtech audit-synthesis-text-manifest \
  outputs/magar-text-smoke-2026-06-16/magar-text.jsonl \
  --out outputs/magar-text-smoke-audit-2026-06-16 \
  --require-language magar \
  --require-script Devanagari \
  --min-samples 100

Result:

passed=True samples=200 claim_eligible=0 issues=0 warnings=0

Tamang Text Converter

Implemented command:

uv run ocrtech prepare-tamang-text \
  --source /Users/cdjk/github/llm/ltk/tamang/data/neptam_train.csv \
  --source /Users/cdjk/github/llm/ltk/tamang/data/neptam_test.csv \
  --source /Users/cdjk/github/llm/ltk/tamang/data/western_tamang_dictionary.tsv \
  --out outputs/tamang-text-smoke-2026-06-16 \
  --limit-per-source 100 \
  --min-text-chars 1

Verified local schemas on 2026-06-16:

  • NepTam CSV: sentence_id, nepali_sentences, translation_tamang, sentence_type, Tense, and polarity.
  • Western Tamang dictionary TSV/JSON: headword, pos, and definition.

The converter emits tamang-text.jsonl in the synthesis-text schema with language=tamang, source path/SHA, text SHA, Unicode block counts, source_schema_verified=true, license_status=pending_review, synthesis_training_candidate=true, and claim_evidence_eligible=false.

Live local smoke on 2026-06-16:

passed=True samples=300 duplicates=2 warnings=0
fields={'definition': 50, 'headword': 50, 'nepali_sentences': 100, 'translation_tamang': 100}
scripts={'Devanagari': 286, 'Mixed_Devanagari_Latin': 14}

Guardrail audit:

uv run ocrtech audit-synthesis-text-manifest \
  outputs/tamang-text-smoke-2026-06-16/tamang-text.jsonl \
  --out outputs/tamang-text-smoke-audit-2026-06-16 \
  --require-language tamang \
  --require-script Devanagari \
  --min-samples 100

Result:

passed=True samples=300 claim_eligible=0 issues=0 warnings=0

Limbu Limdic Converter

Implemented command:

uv run ocrtech prepare-limbu-limdic-text \
  --source /Users/cdjk/github/llm/ltk/limbu/data/limdic_dictionary.json \
  --source /Users/cdjk/github/llm/ltk/limbu/data/limdic_dictionary.tsv \
  --source /Users/cdjk/github/llm/ltk/limbu/data/limdic_firebase.json \
  --out outputs/limbu-limdic-text-smoke

Verified schemas:

  • limdic_dictionary.json: list of objects with id, headword_limbu, desc_devanagari, group, definition, ipa.
  • limdic_dictionary.tsv: tab-separated file with the same required fields.
  • limdic_firebase.json: object with Dic; each dictionary row has dId, desc, group, mean.

Real smoke run on 2026-06-16:

passed=True samples=52303 duplicates=26867 warnings=0
rejected=3

Field counts:

  • headword_limbu: 8,775
  • desc_devanagari: 8,746
  • definition: 8,631
  • dId: 8,775
  • desc: 8,746
  • mean: 8,630

Script counts:

  • Limbu: 17,544
  • Devanagari: 17,494
  • Mixed_Devanagari_Latin: 17,231
  • Mixed_Limbu_Devanagari: 28
  • Mixed_Limbu_Latin: 4
  • Latin: 2

Every row records:

  • source path and source SHA-256
  • source schema name
  • source row id and source field
  • text SHA-256
  • Unicode block counts
  • source_schema_verified=true
  • claim_evidence_eligible=false
  • license_status=pending_review

This manifest is suitable as a text source for later rendering. It is not an OCR image manifest and not validation evidence.

Split Line Renderer

After split-synthesis-text passes, render both train and eval synthesis text splits together:

uv run ocrtech render-synthesis-text-split \
  --train-manifest outputs/toolkit-parallel-text-split/train.jsonl \
  --eval-manifest outputs/toolkit-parallel-text-split/eval.jsonl \
  --out outputs/toolkit-parallel-rendered-lines \
  --font-path /path/to/verified-font.ttf \
  --script Devanagari \
  --require-font

The command writes:

  • train/images/*.png
  • train/manifests/rendered-line-manifest.jsonl
  • train/labels/train.txt
  • eval/images/*.png
  • eval/manifests/rendered-line-manifest.jsonl
  • eval/labels/eval.txt
  • train-rendered-audit/rendered-line-manifest-audit.json
  • eval-rendered-audit/rendered-line-manifest-audit.json
  • rendered-line-split-summary.json
  • rendered-line-split-summary.md

It calls render-synthesis-text-lines separately for train and eval, then runs audit-rendered-synthesis-lines on both outputs with their PaddleOCR label files. Use --require-font for training-bound bundles so font path and font SHA-256 provenance are mandatory.

This command does not replace split-synthesis-text: split and promotion audits must happen before rendering.

Remote rendered split smoke on 2026-06-16:

export PYTHONPATH=/tmp/ocr-tech/src
PY=/opt/homebrew/bin/python3
BASE=/tmp/ocr-tech-remote-audits/magar-toolkit-rendered-split-smoke-2026-06-16

$PY -m ocrtech.cli prepare-toolkit-parallel-text \
  --source /Users/cdjk/github/llm/magar-toolkit/data/mt/train.jsonl \
  --text-field mgp=magar \
  --text-field npi=nepali \
  --row-id-field id \
  --out $BASE/prepared \
  --limit-per-source 8

$PY -m ocrtech.cli split-synthesis-text \
  $BASE/prepared/toolkit-parallel-text.jsonl \
  --out $BASE/split \
  --eval-ratio 0.25 \
  --seed 17 \
  --group-by text_sha256

$PY -m ocrtech.cli render-synthesis-text-split \
  --train-manifest $BASE/split/train.jsonl \
  --eval-manifest $BASE/split/eval.jsonl \
  --out $BASE/rendered \
  --script Devanagari \
  --limit-per-split 4

Result:

prepare passed=True samples=8 duplicates=0 warnings=0
split passed=True train=6 eval=2
render passed=True train=4 eval=2 train_audit=True eval_audit=True
rendered claim_evidence_eligible_count train=0 eval=0

This smoke used default Pillow rendering and therefore did not use --require-font. Training-bound runs must use verified fonts and --require-font.

Limbu Line Renderer

Implemented command:

uv run ocrtech render-synthesis-text-lines \
  outputs/limbu-limdic-text-smoke/limbu-limdic-text.jsonl \
  --out outputs/limbu-rendered-lines-smoke \
  --font-path /System/Library/Fonts/Supplemental/NotoSansLimbu-Regular.ttf \
  --script Limbu \
  --limit 25

Smoke run on 2026-06-16:

passed=True samples=25 skipped=48 warnings=0
font_sha256=2c225a605c5a8aae3c05cf4e8aa710eedf3fa20d59578b1facb127e08ee47191

Outputs:

  • images/*.png: rendered line crops.
  • manifests/rendered-line-manifest.jsonl: standard OCR image manifest.
  • labels/train.txt: PaddleOCR-compatible image path + label file.
  • rendered-line-summary.json and .md: render provenance summary.

Every rendered row preserves:

  • source text manifest and text sample id
  • source file path and SHA-256
  • source schema and field
  • text SHA-256
  • rendered image SHA-256
  • font path and SHA-256
  • claim_evidence_eligible=false

This is now the first end-to-end path from verified Limbu real-text resource to PaddleOCR-style synthetic line image. It is still training data only.

Guardrail audit:

uv run ocrtech audit-rendered-synthesis-lines \
  outputs/limbu-rendered-lines-smoke/manifests/rendered-line-manifest.jsonl \
  --out outputs/limbu-rendered-lines-smoke-audit \
  --label-file outputs/limbu-rendered-lines-smoke/labels/train.txt \
  --require-font

This audit fails if rendered synthetic rows are marked as claim evidence, if image hashes or PaddleOCR labels do not match, if source schema provenance is missing, or if font SHA provenance is missing when --require-font is used.

Bible Brain Text Converter

Implemented command:

uv run ocrtech prepare-bible-brain-text \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/lif/LIFWBT_Limbu/metadata/text_manifest.jsonl \
  --language limbu \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/thr/THRIEM_Tharu__Rana/metadata/text_manifest.jsonl \
  --language rana-tharu \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/taj/TAJWBT_Tamang__Eastern/metadata/text_manifest.jsonl \
  --language eastern-tamang \
  --out data/synthesis-text/bible-brain-nepal

Verified remote schemas from cdjk@100.110.148.43 on 2026-06-16:

  • metadata/text_manifest.jsonl: JSONL rows with bible_id, book_id, chapter, fileset_id, fileset_type, path, and status.
  • text_plain chapter JSON: list of verse objects with verse_text, verse_start, verse_end, book_id, book_name, and chapter.
  • text_json chapter JSON: nested Sofria-style object with schema, metadata, and sequence.blocks; string rows are extracted from paragraph content arrays while preserving sequence/block provenance.

The converter emits bible-brain-text.jsonl in the same synthesis-text schema as the Limdic converter. Every row records:

  • language and detected script
  • text SHA-256 and Unicode block counts
  • chapter path and chapter SHA-256
  • manifest path and manifest SHA-256
  • Bible/fileset/book/chapter metadata
  • source schema and source_schema_verified=true
  • license_status=pending_review
  • claim_evidence_eligible=false

This is useful for real-text OCR synthesis across Limbu, Rana Tharu, Tamang, Gurung, Dhimal, Rajbanshi, Sunuwar, Dangaura Tharu, Newari, Sampang, Kulung, Sherpa, Nepali, and related roots on the 4TB SSD. It is not validation evidence and must not be used for claim-grade evaluation.

Live remote smoke on 2026-06-16:

cd /tmp/ocr-tech
PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli prepare-bible-brain-text \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/lif/LIFWBT_Limbu/metadata/text_manifest.jsonl \
  --language limbu \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/thr/THRIEM_Tharu__Rana/metadata/text_manifest.jsonl \
  --language rana-tharu \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/taj/TAJWBT_Tamang__Eastern/metadata/text_manifest.jsonl \
  --language eastern-tamang \
  --out /tmp/ocr-tech-remote-audits/bible-brain-text-smoke-2026-06-16 \
  --limit-per-manifest 50

Result:

passed=True samples=150 duplicates=3 warnings=0
fields={'content': 50, 'verse_text': 100}
scripts={'Devanagari': 149, 'Other': 1}

The smoke verified the real remote schemas for one nested Sofria text_json source and two text_plain verse sources. The sampled Limbu Bible Brain text is mostly Devanagari orthography, not Limbu/Sirijonga Unicode, so it can help Limbu-language Devanagari synthesis but does not count as Limbu-script coverage. The Limbu/Sirijonga synthesis path still depends on Limdic/Pangloss-style Limbu Unicode sources and verified Limbu fonts.

Readiness expansion smoke on cdjk@100.110.148.43 on 2026-06-16:

cd /tmp/ocr-tech
PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli prepare-bible-brain-text \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/thr/THRIEM_Tharu__Rana/metadata/text_manifest.jsonl \
  --language rana-tharu \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/kle/KLENLI_Kulung/metadata/text_manifest.jsonl \
  --language kulung \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/npi/NPIDPI_Nepali/metadata/text_manifest.jsonl \
  --language nepali \
  --out /tmp/ocr-tech-remote-audits/bible-brain-readiness-smoke-2026-06-16 \
  --limit-per-manifest 80 \
  --min-text-chars 1

PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli audit-synthesis-text-manifest \
  /tmp/ocr-tech-remote-audits/bible-brain-readiness-smoke-2026-06-16/bible-brain-text.jsonl \
  --out /tmp/ocr-tech-remote-audits/bible-brain-readiness-smoke-audit-2026-06-16 \
  --require-language rana-tharu \
  --require-language kulung \
  --require-language nepali \
  --require-script Devanagari \
  --min-samples 120

Result:

prepare: passed=True samples=240 duplicates=0 warnings=0
audit:   passed=True samples=240 claim_eligible=0 issues=0 warnings=0
languages={'kulung': 80, 'nepali': 80, 'rana-tharu': 80}
scripts={'Devanagari': 240}
source_schema={'bible_brain_text_plain_json_v1': 240}

This moves Nepali, Rana Tharu, and Kulung to synthesis-text-ready status for training and ablation data. It does not make them claim-ready validation languages; the rows remain license_status=pending_review and claim_evidence_eligible=false.

Extra readiness expansion smoke on cdjk@100.110.148.43 on 2026-06-16:

cd /tmp/ocr-tech
PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli prepare-bible-brain-text \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/gvr/GVRWBT_Gurung/metadata/text_manifest.jsonl \
  --language gurung \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/dhi/DHIDPI_Dhimal/metadata/text_manifest.jsonl \
  --language dhimal \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/suz/SUZWBT_Sunuwar/metadata/text_manifest.jsonl \
  --language sunuwar \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/rjs/RJSMTS_Rajbanshi/metadata/text_manifest.jsonl \
  --language rajbanshi \
  --manifest /Volumes/TRANSCEND/bible_brain_nepal/xsr/XSRXSR_Sherpa/metadata/text_manifest.jsonl \
  --language sherpa \
  --out /tmp/ocr-tech-remote-audits/bible-brain-readiness-extra-smoke-2026-06-16 \
  --limit-per-manifest 60 \
  --min-text-chars 1

PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli audit-synthesis-text-manifest \
  /tmp/ocr-tech-remote-audits/bible-brain-readiness-extra-smoke-2026-06-16/bible-brain-text.jsonl \
  --out /tmp/ocr-tech-remote-audits/bible-brain-readiness-extra-smoke-audit-2026-06-16 \
  --require-language gurung \
  --require-language dhimal \
  --require-language sunuwar \
  --require-language rajbanshi \
  --require-language sherpa \
  --require-script Devanagari \
  --min-samples 250

Result:

prepare: passed=True samples=300 duplicates=3 warnings=0
audit:   passed=True samples=300 claim_eligible=0 issues=0 warnings=0
languages={'dhimal': 60, 'gurung': 60, 'rajbanshi': 60, 'sherpa': 60, 'sunuwar': 60}
scripts={'Devanagari': 259, 'Mixed_Devanagari_Latin': 36, 'Other': 5}
source_schema={'bible_brain_sofria_text_json_v1': 120, 'bible_brain_text_plain_json_v1': 180}

This moves Gurung, Dhimal, Sunuwar, Rajbanshi, and Sherpa to synthesis-text-ready status for training and ablation data. It also shows why script-level audit remains mandatory: the sample set is not purely Devanagari, and five rows classify as Other. These rows remain pending-license, claim-ineligible training candidates, not Gorkhapatra validation evidence.

Limbu/Sirijonga Unicode Converter

Pangloss audit note: local pangloss_igt_corpus.{json,tsv} and pangloss_annotations/*.xml are verified as phonetic/romanized Limbu resources. They contain useful linguistic forms and glosses, but not U+1900..U+194F Sirijonga text in the sampled corpus. Do not count Pangloss as Limbu-script OCR coverage unless a separate Unicode source is verified.

Implemented command:

uv run ocrtech prepare-limbu-unicode-text \
  --source /Users/cdjk/github/llm/limbu-speech-toolkit/data/external/pustakalaya/limbu_unicode/limbu-bhasha-kaksha-7.txt \
  --source /Users/cdjk/github/llm/limbu-speech-toolkit/data/external/pustakalaya/limbu_unicode/limbu_bhasha_grade6.txt \
  --source /Users/cdjk/github/llm/limbu-speech-toolkit/data/external/web_limbu/limbu_sentences_tagged.tsv \
  --out data/synthesis-text/limbu-unicode \
  --min-limbu-chars 2

Verified schemas:

  • Plain UTF-8 .txt: one candidate OCR text row per non-empty line.
  • Tagged TSV: required fields sentence, source, script, and license.

The converter rejects rows below --min-limbu-chars, so romanized Limbu, English metadata, and blank lines cannot silently enter Sirijonga OCR synthesis. Each row records source path/SHA, text SHA, Unicode blocks, source_schema_verified=true, source/license metadata when present, license_status, and claim_evidence_eligible=false.

Live remote smoke on 2026-06-16:

cd /tmp/ocr-tech
PYTHONPATH=/tmp/ocr-tech/src /opt/homebrew/bin/python3 -m ocrtech.cli prepare-limbu-unicode-text \
  --source /Users/cdjk/github/llm/limbu-speech-toolkit/data/external/pustakalaya/limbu_unicode/limbu-bhasha-kaksha-7.txt \
  --source /Users/cdjk/github/llm/limbu-speech-toolkit/data/external/pustakalaya/limbu_unicode/limbu_bhasha_grade6.txt \
  --source /Users/cdjk/github/llm/limbu-speech-toolkit/data/external/bedus_tokenizer_vocab/limbu_wordlist_sirijanga.txt \
  --source /Users/cdjk/github/llm/limbu-speech-toolkit/data/external/web_limbu/limbu_sentences_tagged.tsv \
  --out /tmp/ocr-tech-remote-audits/limbu-unicode-text-smoke-2026-06-16 \
  --limit-per-source 50 \
  --min-limbu-chars 2

Result:

passed=True samples=200 duplicates=13 warnings=0
rejected=9
fields={'line': 150, 'sentence': 50}
scripts={'Limbu': 177, 'Mixed_Limbu_Devanagari': 23}

Text-manifest audit command:

uv run ocrtech audit-synthesis-text-manifest \
  outputs/limbu-unicode-text-smoke-2026-06-16/limbu-unicode-text.jsonl \
  --out outputs/limbu-unicode-text-smoke-audit-2026-06-16 \
  --require-language limbu \
  --require-script Limbu \
  --min-samples 40

This is the first verified remote path that materially expands Limbu/Sirijonga OCR synthesis beyond dictionary headwords. The rows are still training candidates only; Pustakalaya, eBible, tokenizer-vocab, and web-source license status must be reviewed before any redistribution or publication bundle.

Rendered-line smoke on 2026-06-16:

uv run ocrtech render-synthesis-text-lines \
  outputs/limbu-unicode-text-smoke-2026-06-16/limbu-unicode-text.jsonl \
  --out outputs/limbu-unicode-rendered-lines-smoke-2026-06-16 \
  --font-path /System/Library/Fonts/Supplemental/NotoSansLimbu-Regular.ttf \
  --script Limbu \
  --limit 40 \
  --font-size 36 \
  --padding 16

uv run ocrtech audit-rendered-synthesis-lines \
  outputs/limbu-unicode-rendered-lines-smoke-2026-06-16/manifests/rendered-line-manifest.jsonl \
  --out outputs/limbu-unicode-rendered-lines-smoke-audit-2026-06-16 \
  --label-file outputs/limbu-unicode-rendered-lines-smoke-2026-06-16/labels/train.txt \
  --require-font

Result:

render: passed=True samples=40 skipped=0 warnings=0
audit: passed=True samples=40 claim_eligible=0 issues=0 warnings=0
scripts={'Limbu': 40}
font_sha256=2c225a605c5a8aae3c05cf4e8aa710eedf3fa20d59578b1facb127e08ee47191

The rendered manifest writes PaddleOCR-compatible labels at labels/train.txt. Each rendered row preserves the source text manifest row id, remote source path, source SHA, text SHA, image SHA, font path/SHA, source_schema_verified=true, and claim_evidence_eligible=false.