ELD — phoneme inventory¶
.eld is the phoneme inventory, written in KDL 2.0. It is the
one linguistic module ELANG v0.1.0 defines. An ELD document describes a
language's sounds as groups of root phonemes, each with a romanization,
optional allophones, and optional conditional realization rules.
Example¶
phonemes {
consonants {
phoneme "t" {
roman "t"
allophone "ɾ"
allophone "tʰ" {
roman "th"
when {
word-position "initial"
}
}
}
}
vowels {
phoneme "a" {
roman "a"
}
}
diphthongs {
phoneme "aɪ" {
roman "ai"
}
}
}
Top level¶
An ELD document contains exactly one top-level phonemes node with an
explicit, nonempty block and zero arguments or properties. Empty, whitespace-only,
or comment-only files are rejected, as are any additional top-level nodes.
Groups¶
phonemes {
consonants { /* ... */ }
vowels { /* ... */ }
// optional custom groups:
diphthongs { /* ... */ }
}
- Exactly one
consonantsgroup and onevowelsgroup, each with ≥ 1 root phoneme. - Up to 16 groups total (so up to 14 custom groups); every custom group must be nonempty.
- Group names are unique. Custom group names match the regex
[a-z]+(?:-[a-z]+)*and are 1–32 ASCII characters.consonantsandvowelsare reserved. - Group nodes take zero arguments/properties and require a child block whose only
direct children are
phonemenodes. - Group source order carries no meaning. The canonical order is
consonants,vowels, then custom groups in ASCII bytewise order.
Root phonemes¶
phoneme "<IPA>" {
roman "<spelling>"
// optional:
when { /* ... */ }
// zero or more:
allophone "<IPA>"
}
phonemetakes exactly one IPA string argument, zero properties, and a mandatory nonempty block.- Exactly one
romanchild; optional zero-or-onewhen; zero to 16 directallophonechildren. - At most 256 root phonemes across all groups.
- Root IPA identifiers are globally unique across every group and allophone. You cannot "reuse" a sound by placing it in another group.
- Only
roman,when, andallophonechildren are allowed.frequency,distribution,description, and any other field are rejected. - Canonical child order:
roman, then optionalwhen, then allophones sorted by IPA. Source declaration order carries no priority.
Allophones¶
An allophone is a conditional surface pronunciation of its root.
// Fieldless: a bare leaf (no braces).
allophone "ɾ"
// With fields: a nonempty block.
allophone "tʰ" {
roman "th"
when { word-position "initial" }
}
allophonetakes exactly one IPA string argument and zero properties, and must be a direct child of a root phoneme (never nested under another allophone).- Optional zero-or-one
roman; optional zero-or-onewhen. - A fieldless allophone is a bare leaf —
allophone "ɾ". Writingallophone "ɾ" {}with an empty block is invalid. When fields are present, the block must be nonempty. - An omitted
romaninherits the parent root's exact-case romanization. Inherited romanizations do not count as explicit duplicates. - An omitted
whenmeans unconditional eligibility. An explicit emptywhen {}is invalid.
Independence of conditions¶
A root's when and an allophone's when are evaluated independently — the
child does not inherit the parent's condition. Multiple pronunciations can be
eligible at once; the generator selects among them with no weighting or
declaration priority. If none is eligible in a given context, the inventory is
still valid — the generator simply avoids that placement or chooses a different
root. ELANG defines no fallback pronunciation.
Romanization¶
romanis a scalar leaf: exactly one string argument, no properties, no block.- An explicit value matches
[A-Za-z]{1,8}— 1 to 8 ASCII letters, preserving case exactly in canonical output. - Every explicit
romanacross all roots and allophones is globally unique using ASCII case-insensitive comparison. For example,thandTHcollide. Inherited romanizations are exempt.
Note
There is no frequency field anywhere in ELD v0.1.0. Statistical weighting
is out of scope for this release.
IPA identifiers¶
Every phoneme and allophone IPA string is validated against the pinned IPA
Repertoire v1 and a strict set of Unicode and structural rules (logical units,
modifiers, tie bars, length). Those rules are detailed in
Unicode & IPA.
Canonical form¶
The canonical ELD serializer fixes group/root/allophone ordering, child ordering, condition ordering, indentation, line endings, and string quoting, so that semantically equal inventories always produce identical bytes.