File size: 66,560 Bytes
f9bc0c1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 | # 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
```bash
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```text
rows=1936
corpus-stat warning_counts={}
NFC-changed rows=0
NFD-changed rows=0
```
Render command:
```bash
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:
```text
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:
```bash
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:
```text
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.
```text
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:
```bash
uv run ocrtech prepare-font-assets \
configs/namdhinggo-font-assets-v1.json \
--out outputs/font-assets-namdhinggo-2026-06-16
```
Result:
```text
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```text
passed=True
train=150
eval=27
train_audit=True
eval_audit=True
font_sha256=1b46b16277e4b6784bd19306a9474281888b656e9c57233b4e7dc63bd1229d6c
claim_evidence_eligible_count=0
```
Readiness-gated rendered audits:
```bash
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:
```text
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:
```text
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:
```text
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:
```bash
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:
```text
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:
```bash
uv run ocrtech audit-augmentation-ablation \
configs/limbu-sirijonga-augmentation-ablation-v1.json \
--out outputs/limbu-sirijonga-augmentation-ablation-audit-current
```
Current result:
```text
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:
```bash
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:
```text
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```text
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.
```bash
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:
```text
~/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:
```text
/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.
```text
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.
```text
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:
```text
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:
- [x] Limbu Limdic JSON/TSV/Firebase converter.
- [x] Bible Brain `metadata/text_manifest.jsonl` converter for
`text_plain` verse JSON and nested Sofria `text_json` chapter JSON.
- [x] Limbu/Sirijonga Unicode plaintext and tagged sentence TSV converter.
- [x] Tamang NepTam CSV and Western Tamang dictionary TSV/JSON converter.
- [x] Magar Western dictionary TSV/JSON converter.
- [x] 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:
- [x] Verify the cdjk remote path exists with read-only SSH, not by memory.
- [x] 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:
```bash
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:
```bash
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
```
```bash
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
```
```bash
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```text
passed=True samples=200 claim_eligible=0 issues=0 warnings=0
```
## Tamang Text Converter
Implemented command:
```bash
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:
```text
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:
```bash
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:
```text
passed=True samples=300 claim_eligible=0 issues=0 warnings=0
```
## Limbu Limdic Converter
Implemented command:
```bash
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:
```text
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```text
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:
```bash
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:
```bash
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:
```text
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:
```bash
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:
```bash
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:
```text
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`.
|