Skip to content

Data files ​

Three JSON files in data/ describe all 923 Sinhala letter forms. They share one id per form, so they join on it. Browse them in the letter explorer.

FileBuilt byWhat
letters.jsontools/build_data.pyThe inventory: text and code points of each form
validity.jsontools/build_data.pyStatus of each form and the rules behind it
romanization-coverage.jsontools/check_romanization.pyThe romanizations that produce each form, per option set

IDs ​

KindCountIDExample
Independent vowel18vowel.<vowel>vowel.aa ආ
Sign3sign.<name>sign.anusvara ං
Consonant form41 × 19<consonant>.<vowel>ka.hal ක්, ka.a ක, ka.ru කෘ
Conjunct41 × 3<consonant>.<conjunct>ka.yansaya ක්‍ය, ka.rakaransaya ක්‍ර, ka.repaya ර්‍ක

Vowel IDs: hal a aa ae aee i ii u uu ru ruu ilu iluu e ee ai o oo au. Consonant IDs follow 01 · Letter inventory, in Unicode order from ka ක to fa ෆ.

letters.json ​

json
{ "id": "ka.ru", "kind": "syllable", "text": "කෘ", "consonant": "ka", "vowel": "ru",
  "codepoints": ["U+0D9A", "U+0DD8"] }

kind is vowel, sign, syllable or conjunct. Conjuncts carry conjunct instead of vowel.

validity.json ​

json
{ "id": "ka.u", "text": "කු", "status": "valid", "shape": "hook-u", "rules": ["G-VS-13"] }
statusCountMeaning
valid380In ordinary use
loan193Valid, but in practice only in Sanskrit or Pali (tatsama) words
rare101A valid encoding that is marginal or archaic in use
unattested117No known word uses it, but no rule forbids it
never132Forbidden by a hard rule (G-HC-06, G-HC-07, G-HC-08, G-HC-14, G-VS-08)

shape flags a glyph that is drawn specially. The encoding is unchanged (G-EN-11): hook-u, irregular (ර and ළ with u/uu, ර with ae/aee), tail-loss and alt-hal. It is null for the other 897 forms.

Consonant × vowel statuses come from the 41 × 17 table in 02 · Vowel signs §8. They are a synthesis of the sources, not a corpus count, except the ෘ / ෲ columns, which were checked against a 2.1M-word list (VS-035).

romanization-coverage.json ​

json
{ "id": "ka.repaya", "text": "ර්‍ක", "status": "valid",
  "default": [], "repaya_zwj": ["rka", "rca"], "classical": [], "archaic": [],
  "rakaransaya_u": [] }

Each option set lists up to four romanizations that produce the form, shortest first. Signs are written after ක (kax → කං), and letters that can't start a word are written after අ (azda → අඳ). An empty list means that option set can't produce the form. ZWJ repaya needs repaya_zwj, and archaic letters need archaic. All 791 forms that aren't never are producible under some option set.