Skip to content

manifests: the Adlam and Roman-Balochi script tables leave the .ts - #753

Merged
christopherthompson81 merged 4 commits into
mainfrom
script-tables
Aug 8, 2026
Merged

manifests: the Adlam and Roman-Balochi script tables leave the .ts#753
christopherthompson81 merged 4 commits into
mainfrom
script-tables

Conversation

@christopherthompson81

Copy link
Copy Markdown
Owner

The last two whole transliteration tables still living in code — noted in #746, and skipped in #748 because pulling three sets out of a file whose surrounding table stayed behind would have been incoherent.

Stacked on #751 (both languages have manifest changes there); merge that first.

balochi — a roman block

Balochi is written in both scripts, and the Roman half is a second full g2p: phonemic, where the Arabic half is defective and leans on the lexicon. Its vowel letters, long/short maps, consonants, and the retroflex/postalveolar diacritic maps all move. The DIACRITIC LOGIC — which mark reaches for which table, and that a macron may arrive combining or precomposed — stays in balochi.ts, which is the point of the split.

One thing the move let the data state plainly: ⟨e o⟩ are long in both columns, because Balochi has no short /e o/. That was a trailing // e,o have no short counterpart on a const.

fula — an adlam block

34 letters plus the combining marks. Two things now recorded where a reader will find them:

  • Adlam marks length and gemination with MARKS, not by doubling — which is why the transliteration doubles what it just emitted rather than mapping them to anything.
  • The marks are written as surrogate pairs: they are astral (U+1E944–1E94A) and JSON has no \u{…} form — and they are invisible combining marks, so a literal would be a blank in the file. Verified they round-trip: all 34 letters and every mark come back at the right codepoint.

A triplicate the move surfaced

Adlam digits were being folded in three places: a lookup table in fulaAdlam.ts, foldAdlamDigits in numbers.ts, and core/unicode.ts's foldNativeDigits — which has carried the Adlam base since #745. Both local copies now defer to the shared one.

Verification

Pure relocation: 998 generated Adlam and Roman-Balochi words phonemized against main, 0 differ. Spot-checked end to end — 𞤀𞤣𞤤𞤢𞤥 → adlam → ˈadlam (uppercase folds), 𞤢𞥅𞤤𞤢 → aala → ˈaːla (lengthener), 𞥑𞥒𞥓 → 123 → number words. npm run ci green: 228 files / 3136 tests, typecheck, fence.

Also includes a fix to #751's quechua entry, which orphaned the digraphs header from its table — the same defect as #746 and #750, caught by the same script.

🤖 Generated with Claude Code

https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr

christopherthompson81 and others added 4 commits August 7, 2026 23:14
They were named like IPA classes (VOWELS, R_VOWEL) but scan SPELLING, which is why pointing them at
core/ipa.ts broke Quechua. #748 reverted them with a comment; this puts them where #746 says they
belong, with the trap recorded beside the data:

  quechua  spellingVowels — the -yuq/-niyuq suffix reads the last LETTER; ⟨y⟩ is absent on purpose,
           being a consonant letter in Quechua but the IPA vowel
  luo      spellingVowels — the gi-/g- elision reads the first letter of the next number word
  balochi  romanVowels    — the ROMAN scan, distinct from the Arabic-script vowelLetters beside it
  fula     latinVowels    — the letters the Adlam lengthener doubles in adlamToLatin's output

quechua gains a manifest.ts for the single parse (quechua.ts imports numbers.ts, so a back-import would
cycle) — the abkhaz/georgian pattern. luo and fula already had one; balochi.ts already had DEF.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
The last two whole transliteration tables still living in code — noted in #746, skipped in #748 because
moving three sets out of a file whose surrounding table stayed would have been incoherent.

balochi gains a "roman" block: Balochi is written in BOTH scripts and the Roman half is a second full
g2p (phonemic, where the Arabic half is defective). Vowel letters, long/short, consonants, and the
retroflex/postalveolar diacritic maps. The DIACRITIC LOGIC stays in balochi.ts, which is the point of
the split.

fula gains an "adlam" block: 34 letters plus the combining marks. Two things worth the reader's time are
now recorded there — that Adlam marks length and gemination with MARKS rather than doubling (so the
transliteration doubles what it just emitted rather than mapping them), and that the marks are written
as SURROGATE PAIRS because they are astral and JSON has no \u{…} form, and invisible besides.

And the move surfaced a triplicate: Adlam digits were folded in THREE places — a lookup table in
fulaAdlam.ts, foldAdlamDigits in numbers.ts, and core/unicode.ts's foldNativeDigits, which has carried
the Adlam base since #745. Both copies now defer to the shared one.

Pure relocation: 998 generated Adlam/Roman words phonemized against main, 0 differ.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
foldNativeDigits returns a NON-digit unchanged, so ADLAM[ch] ?? foldNativeDigits(ch) was never
undefined — which killed the pass-through branch below it and, worse, set lastBase (the gemination
target) from characters that are not Adlam letters. A stray ’ or an Arabic-Indic digit before U+1E946
doubled itself instead of the last real letter. It also folded every other script's digits inside an
Adlam token. Guarded on the Adlam digit range, which is what the DIGITS lookup it replaced covered.

Verified against main on 1292 generated words that now include stray and foreign characters precisely
so this path is exercised — the earlier 998-word run used only well-formed Adlam and missed it.

Also split balochi's stacked header: the first paragraph still described the flat romanVowels key from
#751 rather than the six-table roman object that landed, so it now sits on roman.vowelLetters where it
is true.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
#751 squash-merged, so its commit replayed here as a duplicate carrying the ORPHANED header layout
that the follow-up fix had already corrected on main. Taking main's version outright; this branch now
contains only its own six files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Lc3WnUgogC7okV7n53vjr
@christopherthompson81
christopherthompson81 merged commit f000db2 into main Aug 8, 2026
2 checks passed
@christopherthompson81
christopherthompson81 deleted the script-tables branch August 8, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant