AMR AI — Letter / Root / Tasrif Architecture

How AA (ORIG1) and BI (ORIG2) words are structured, analyzed, and cross-referenced

AA — Allah's Arabic (ORIG1)
The divine language of the Qur'an, taught to Adam (AS)
28 letters | 1,710 roots | 77,877 Quranic tokens
Source: Qur'an (absolute) | amr_alphabet.py | amr_tasrif.py
BI — Bitig (ORIG2)
From Yafith (AS). Kashgari's Diwan (1072 CE) = primary attestation
26 phonemes | 1,900 roots (bitig) | 2,083 diwan entries
Source: Arabic MS (absolute) | amr_bitig_tasrif.py | amr_bitig_alphabet.py
Layer 0 — Letters (the atoms)
AA LETTERS — amr_alphabet.py (29 entries)
Each letter has 11 fields:

FieldWhat it isExample (د)
nameArabic nameدَال
abjadNumerical value4
core_conceptSemantic atomKNOCK
phonetic.makhrajArticulation pointTongue tip → upper teeth
behaviour.as_R1When opens rootCALLING/POSITIONING
behaviour.as_R2When core of rootWEIGHT/DEFINITE IMPACT
behaviour.as_R3When closes rootANCHORING
shiftsDownstream phonetic shiftsد→d, د→t (devoicing)
quranic_statsToken/root counts per position5,204 tokens, 223 roots
semantic_tendencyFull semantic descriptionKNOCK. POSITION. ACCOUNTABILITY.
paired_lettersCommon letter combinationsد+ع = calling from depth
BI PHONEMES — amr_bitig_alphabet.py (26 entries)
Vowel harmony system:

CategoryPhonemesFunction
BACK vowelsa, ı, o, uGovern suffix selection (back set)
FRONT vowelse, i, ö, üGovern suffix selection (front set)
Consonants18 consonantsRoot structure carriers
Harmony pairsa↔e, ı↔i, o↔ö, u↔üSuffix variant selection

Violation of vowel harmony = contamination signal
BG10 (Vowel Harmony) is the structural law of BI
Layer 1 — Roots (letters combine into meaning units)
AA ROOTS — compute_root_meaning()
Root = 2-4 letters. Each letter's core_concept combines:

RootLettersSemantic CoreAbjadTokens
د-ب-بKNOCK+CLOSURE+CLOSUREHeavy crawling thing814
م-ل-كENCLOSURE+CONNECTION+TAPSovereign containment90185
ح-ك-مCONSTRICTION+TAP+ENCLOSUREJudging/binding decree68195
أ-ج-رSTOP+PRESS+MOVEMENTCompensation/wage20498
ج-د-رPRESS+KNOCK+MOVEMENTWall/enclosure2074

1,710 distinct roots | every root traces to 28 letters
BI ROOTS — diwan_roots + bitig_a1_entries
BI roots = typically 1-3 consonants (agglutinating, not inflecting):

BI RootHeadwordKashgari AA GlossAA Root Traced
b-kبكو (buko)الملك والحاكم والعاقلم-ل-ك / ح-ك-م / ع-ق-ل
b-zباز (baz)أُجْرَة الأَجِيرأ-ج-ر
q-nقان (qan)الدَّمد-م-ي
t-mتام (tam)الجِدارج-د-ر
s-nسان (san)العَدَدع-د-د

1,900 bitig roots | 2,083 diwan entries | 1,242 distinct diwan roots
Layer 2 — Tasrif: Consonant Structure (what letters are added to the root)
AA VERB STRUCTURE — 8 codes (5,862 tokens)
CodeStructureFunctionTokens
HAMZA_PREFIXأ prefixedCAUSE action outward2,097
DD_MIDDLER2 doubledINTENSIFY from within1,437
T_INFIXت after R1Action turned INWARD775
ALIF_INFIXا between R1R2MUTUAL engagement451
N_PREFIXن prefixedPASSIVE reception402
T_PREFIXت prefixedSelf-REFLEXIVE370
ALIF_PREFIX_Kاسـت prefixedSEEK root action268
T_DD_COMBOت + R2 doubledSelf-intensification62
BI VERB STRUCTURE — 8 codes (BV01-BV08)
CodeSuffixFunctionExample
BV01-gan/-kanPAST PARTICIPLE → nounkorgan (seen/seer)
BV02-ur/-arAORIST/presentkorur (he sees)
BV03-di/-tiDEFINITE pastkordi (he saw)
BV04-maq/-makINFINITIVEkormaq (to see)
BV05-mish/-mushEVIDENTIAL pastkormish (apparently saw)
BV06-sa/-seCONDITIONALkorsa (if he sees)
BV07-gali/-kaliPURPOSEkorgali (in order to see)
BV08-a/-eOPTATIVEkora (may he see)
AA NOUN STRUCTURE — 12 codes (39,593 tokens)
CodeStructureFunctionTokens
BASEPure rootDirect naming32,006
Y_BETWEEN_R2R3ي between R2R3PERSISTENT doer2,154
A_BETWEEN_R2R3ا between R2R3Extended STATE1,343
A_BETWEEN_R1R2ا between R1R2Agent/actor966
M_PREFIXم prefixedPLACE/TOOL of action1,413
M_PREFIX_Wم prefix + وPASSIVE participle664
+ 6 moreT_PREFIX, HAMZA_PREFIX, DD_R2, etc.
BI NOUN STRUCTURE — 6 codes (BN01-BN06)
CodeSuffixFunctionCount
BN01-liq/-likABSTRACT noun / quality88 hw
BN02-ci/-chiAGENT (doer)-
BN03-man/-menAUGMENTATIVE agent10 hw
BN04-daq/-dakSIMILARITY / belonging-
BN05-siz/-suzWITHOUT (privative)-
BN06-la/-leVERBALIZER (noun→verb)-
Layer 3 — AA: Vowel Pattern (17 codes) | BI: Case System (6 codes)
AA VOWEL PATTERNS — 17 codes (25,304 tokens)
Vowels sit ON the consonant skeleton — same root, different vowels = different meaning:

CodeR1R2FunctionTokens
FA3La0Minimal noun5,243
FA3ALaaOpen/action noun7,565
FA3ILaiEngaged noun3,925
FU3ULuuDeep/internal1,283
FI3ALiaBroken plural733
+ 12 more vowel codes including 5 broken plural patterns

كِتاب (kitab) = FA3AL pattern on ك-ت-ب root
كاتِب (katib) = FA3IL on same root = different meaning
BI CASE SYSTEM — 6 codes (BC01-BC06)
BI has NO internal vowel pattern — uses SUFFIX stacking:

CodeSuffixCaseFunction
BC01(bare stem)NOMINATIVESubject (default)
BC02-ni/-nıACCUSATIVEDirect object
BC03-ga/-ge/-qaDATIVEDirection / recipient
BC04-da/-de/-taLOCATIVELocation (at/in)
BC05-dan/-den/-tanABLATIVESource (from)
BC06-ning/-nıngGENITIVEPossession (of)

at (horse) → at-nı (horse-ACC) → at-qa (to-horse) → at-da (at-horse)
Layer 4 — Grammar (external markers)
AA GRAMMAR — 11 verb defs + 13 noun defs
DimensionValuesMarker
TENSEMADI (past) | MUDARI (present) | AMR (command)prefix/suffix
PERSON1st | 2nd | 3rdي/ت/ن/أ prefixes
NUMBERSINGULAR | DUAL | PLURALsuffix
GENDERMASC | FEMة suffix
CASEMARFU (nom) | MANSUB (acc) | MAJRUR (gen)ending vowel
DEFINITENESSDEFINITE (ال) | INDEFINITE (tanwin) | CONSTRUCTprefix/suffix

Verb grammar: 15,333 tokens coded | Noun grammar: 34,058 tokens coded
BI GRAMMAR — 10 codes (BG01-BG10)
CodeCategorySuffixFunction
BG01-03POSSESSIVE-im/-ing/-iMy / Your / His
BG04-06POSSESSIVE PL-imiz/-ingiz/-lariOur / Your / Their
BG07VOICE-il/-in/-ulPASSIVE
BG08NEGATION-ma/-meNOT
BG09QUESTION-mu/-mi? (interrogative)
BG10VOWEL HARMONY(structural law)Back↔Front
Layer 5 — BI Compound Formation (8 rules) | AA: N/A (uses idhafa)
BI COMPOUNDS — 8 codes (COMP01-COMP08)
CodePatternFunctionExample
COMP01NOUN + NOUNDescriptive (modifier first)qara tas = black stone = pencil
COMP02VERB + -GANParticipial compoundqorugan = protected place = fortress
COMP03NOUN + VERBIncorporating compoundbasmaq = to stamp/print
COMP04NUM + NOUNNumerical compounduch oq = three arrows (tribal name)
COMP05-08Reduplicated, Echo, Copulative, Denominative

BI word order: MODIFIER + HEAD (opposite of AA idhafa where HEAD + MODIFIER)
Cross-Reference — The Diwan Bridge
How AA and BI connect through Kashgari's Diwan
Kashgari provides the AA gloss for each BI headword. AMR AI then:

1. Takes the BI headword → decomposes via BV/BN/BC/BG codes
2. Takes Kashgari's AA gloss → traces each Arabic word to its ROOT
3. Each root → letter-level semantic analysis via amr_alphabet
4. Each root → tasrif code (L1 consonant + L2 vowel + L3 grammar)
5. Each root → Quranic token count (proof of existence, not from weights)

Result: Every BI word connects through its AA gloss to Quranic roots, with full letter/root/tasrif analysis on both sides. No flat strings. No weight contamination. Every claim traceable to 28 letters and 77,877 tokens.
Example — Enriched Entry vs Flat String
DW891 — بكو (buko) = الملك والحاكم والعاقل
aa_gloss = "al-malik wa-l-hakim wa-l-aqil"
BI SIDE:
  Headword: بكو (buko)
  Root: ب-ك [22] = CLOSURE(2) + TAP(20)
  Structure: BC01 (bare stem, nominative)

AA SIDE — 3 roots from Kashgari's gloss:

  الملك — م-ل-ك [90] = ENCLOSURE + CONNECTION + TAP
    L1: BASE | L2: FA3IL | L3: SINGULAR MASC DEFINITE
    Quranic: 185 tokens | Q1:4 مَٰلِكِ يَوْمِ الدِّينِ

  الحاكم — ح-ك-م [68] = CONSTRICTION + TAP + ENCLOSURE
    L1: A_BETWEEN_R1R2 | L2: FA3IL | L3: SINGULAR MASC DEFINITE
    Quranic: 195 tokens | Q2:32 ٱلْحَكِيمُ

  العاقل — ع-ق-ل [200] = DEPTH + STRIKE + CONNECTION
    L1: BASE | L2: FA3IL | L3: SINGULAR MASC DEFINITE
    Quranic: 49 tokens | Q2:44 تَعْقِلُونَ
Data Flow Summary
BI HEADWORDbitig_tasrif decompose → BI root + suffix codes

KASHGARI'S AA GLOSS (from Arabic MS, not Dankoff)

Each AA word → amr_tasrif → L1 (consonant) + L2 (vowel) + L3 (grammar)

Each AA root → amr_alphabet → letter semantics + abjad + positional behaviour

Each AA root → quran_word_rootstoken count (existence proof from 77,877 tokens)

ENRICHED ENTRY — every claim traces to letters and Quranic tokens. Zero weights.