Repository navigation
Add Modern Standard Arabic — the first templatic engine (Verified) - #151
Merged
Merged
Conversation
Arabic is root-and-pattern: cited by the unvoweled consonantal skeleton of the 3sg-masc perfect, whose vocalisation the skeleton doesn't fix. The engine resolves each lemma to four fully-voweled principal parts (perfect/imperfect × active/passive, mined into data/ara/parts.tsv) and derives the whole paradigm by regular person/number/gender/mood/voice affixation plus weak-root morphophonemics — hollow, defective, doubled, assimilated and hamzated roots, generalised across the derived forms II–X. A small mined-override layer (data/ara/overrides.tsv, 1112 cells) patches the genuinely irregular residue the rules don't reach (doubly-weak and hamza-hollow roots). Verified against the agreement of two independent oracles — a kaikki.org (Wiktextract) extraction crossed with UniMorph — normalised to a shared canonical feature vocabulary. The otiose-alif spelling of the -ū plural was the main systematic split; normalising it lifted agreement to ~94%, a ~48,300-cell gold across 640 lemmas. Golden gate: forms 48288/48288 (100.00%), lemma coverage 640/640 (100.00%), 97.7% rule-derived / 2.3% overridden. Full registration: Lang::Ara, from_code ar/ara/arabic, Conjugation + build dispatch, reverse index, PyO3 + wasm bindings, Cargo includes, correctness.py, and the CI two-oracle gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The headline of the Arabic-family goal, and ablaut's first root-and-pattern engine.
Approach
Arabic is cited by the unvoweled consonantal skeleton (كتب), which doesn't fix the vocalisation, so the paradigm can't be voweled from the lemma alone. The engine resolves each lemma to four fully-voweled principal parts (perfect/imperfect × active/passive 3sg-masc, mined into
data/ara/parts.tsv) and derives the whole paradigm by regular person/number/gender/mood/voice affixation + weak-root morphophonemics — hollow, defective, doubled, assimilated, hamzated, generalised across the derived forms II–X. A small mined-override layer (data/ara/overrides.tsv, 1,112 cells) patches the irregular residue (doubly-weak, hamza-hollow).Verification
Two independent oracles — kaikki.org (Wiktextract) ∩ UniMorph — normalised to a shared canonical feature vocabulary. The otiose-alif spelling of the
-ūplural was the main systematic split; normalising it lifted agreement to ~94%, a ~48,300-cell gold across 640 lemmas.Golden gate: forms 48288/48288 (100.00%), lemma coverage 640/640 (100.00%).
Split: 97.7% rule-derived, 2.3% overridden.
Registration
Lang::Ara,from_codear/ara/arabic,Conjugation::Ara+ build dispatch, a 9-group serdeTable(perfect/imperfect/subjunctive/jussive/imperative × active+passive), reverse index, PyO3 + wasm bindings, Cargo includes,correctness.py, and the CI two-oracle gate. All green: 330 lib tests,clippy -D warnings,fmt --check,--features pythonand--features wasm.Notes
First of the Semitic set; Egyptian Arabic (data already banked), Hebrew, Amharic, Syriac, Maltese follow.
🤖 Generated with Claude Code