lect-id = anchor [ ":" stage ] [ "/" variety ] [ "~" script ] [ "@" ortho ]
Axes are ordered (: before / before ~ before @) and
all-lowercase.
anchor — 2–3 lowercase letters, optionally hyphen-extended
(roa-opt, ine-bsl): an ISO 639-1/2/3/5 or established Wiktionary
code naming the most specific genealogical node the lect hangs from.
A bare anchor is a legal lect and means the anchor’s whole span.stage — 2–5 lowercase alphanumerics starting with a letter, from the
anchor’s registered stage set. Digits are admitted (v1.1) because the
fields’ own periodization names carry them — sux:ur3 is Ur III;
pure-letter tags remain the norm.variety — 2–8 lowercase alphanumerics starting with a letter, from
the anchor’s registered variety set (widened from 2–5 in the
pre-v1.0.0 window — №R-41 — so IANA variant subtag names ride
verbatim: oc/lengadoc, oc/vivaraup; the ortho slot’s length
rule, now shared).script — exactly 4 lowercase letters: an ISO 15924 code, lowercased,
from the global scripts: table (not per-anchor). Claims the
script of the text as held — see the scripts section below.ortho — 2–8 lowercase alphanumerics (starting with a letter) from
the anchor’s registered orthography set.Identifiers sort by anchor lexicographically; chronological order
within an anchor comes from the registry’s ord fields, never from tag
spelling.
Top level: one anchors: mapping keyed by anchor code, and one global
scripts: mapping keyed by lowercased ISO 15924 code.
| Field | Meaning |
|---|---|
name |
Display name. |
kind |
family on ISO 639-5 / Wiktionary family codes; absent on languages. A family anchor is read genealogically as its root lineage — the clade viewed from its common ancestor (which is what its pro stage reconstructs). |
glottocode |
Crosswalk to Glottolog ([a-z]{4}[0-9]{4}), not an identity: the world tree beyond this registry is reachable through it. Stated only where verified; never guessed. |
band |
[start, end] in years; negative = BCE; null = open. A per-anchor recorded decision, always paired with band_note. Bands document and aid per-document assignment; they are never derivation inputs. |
band_note |
Names the convention the band follows (“ISO 639-2/MARC reference name”, “approximate Egyptological convention”, …). Required wherever band is stated. |
parent |
A descent edge (see below). |
note |
Free prose: cross-references, caveats, contact-language and subgrouping commentary that deliberately does not get edges. |
stages / varieties / orthos |
The registered tag sets, below. |
| Field | Meaning |
|---|---|
name |
Display name. |
ord |
Integer, unique within the anchor: chronological display order. |
mode |
attested (default, omitted) or reconstructed. The one machine-load-bearing field: consumers’ reconstruction predicates read it — never the tag spelling, never a code suffix. |
band, band_note |
As on anchors; stage bands may overlap where a tradition’s grid is dialect × period rather than a single ladder (e.g. Neo-Assyrian beside Neo-Babylonian). |
wikt / iso |
Provenance crosswalks to the code that motivated the entry (wikt: la-med, iso: och). |
note |
Free prose. |
name, kind (one of register, sociolect, recension, dialect),
optional wikt/iso crosswalks and note. Varieties carry the axis the
standards conflate with stage: Literary Chinese is kind: register; the
Church Slavonic recensions are kind: recension. Where a script choice is
constitutive of a community (aljamiado traditions), it is modeled as a
variety, not an orthography.
name, optional script: scope and note. Orthography tags name
spelling reforms within one script (kyūjitai, the Bohorič alphabet)
and reuse IANA variant names where they exist (bohoric, petr1708).
The script: field names the script the reform lives in, resolved
against the global scripts: table (bohoric: {script: latn},
kyu: {script: jpan}).
A single global scripts: mapping — deliberately not per-anchor:
digraphia is open-ended, and which scripts a language is attested in is
a fact about collections, not about the registry. Keys are ISO 15924
codes lowercased; rows carry name, iso15924 (the canonical
spelling — must match the key when lowercased) and optional note.
The ~ axis claims the script of the text as held — the surface a
reader of the document meets, machine-checkable against the bytes. It
never claims the artifact’s original writing system: a
Latin-transliterated cuneiform tablet is ~latn, and the tablet’s Xsux
belongs in the consumer’s own artifact field. (Why: measured catalogs
show the BCP 47 suffix convention carrying both claims with no way to
say which — san-Latn is usually a surface fact, egy-Egyd usually an
artifact fact. The axis is defined to say exactly one thing.) Where a
script choice is constitutive of a community (aljamiado traditions), it
stays a variety, not a script tag.
parent: holds a lect id (bare anchor or staged lect) and means: this
lineage continues from that one. One edge kind covers every node pairing,
because a family anchor is identified with its root lineage —
roa: {parent: lat} (family→language), gmw: {parent: gem}
(family→family, i.e. subgrouping as descent of the root),
lat: {parent: itc:pro} (language→reconstructed lect).
ord;
they are never each other’s parents. Where standards coded stages as
separate languages (ang/enm/en), those anchors chain by parent.note:.roa runs lat → itc:pro → (via
itc) → ine without every stage needing an edge.note: prose and the Glottolog crosswalk, not edges.Top level: one map: mapping from standard codes (ISO 639, Wiktionary —
including etymology-only and -pro codes) to lect ids.
Identity is the default rule. Any code not listed maps to itself as a
bare anchor; the file lists only non-identity mappings, so every line is a
decision. Bare-anchor targets need no registry entry; any target carrying
a stage, variety, script, or orthography must resolve against
lects.yml (scripts against the global table).
Precedence for consumers, highest first:
Entries here state only what is true of the code itself, for any consumer. Knowledge about particular collections never enters this file.
bin/validate (standard-library Ruby) enforces: YAML well-formedness;
the identifier grammar everywhere; referential integrity (codemap targets
and parent edges resolve; stage/variety/ortho tags are defined on their
anchors, script tags and ortho script: scopes in the global table);
scripts-table shape (ISO-15924 keys, iso15924 consistent with the key);
ord uniqueness per anchor; band sanity (start ≤ end); Glottocode
shape; parent-graph acyclicity. CI runs it on every push and pull
request.