Skip to content

Add locales.MY, a Burmese pack: U and Daw as titles, nine syllables kept name words - #1480

Merged
derek73 merged 13 commits into
masterfrom
claude/issue-1231-burmese-pack-39db4d
Nov 19, 2026
Merged

derek73 merged 13 commits into
masterfrom
claude/issue-1231-burmese-pack-39db4d

Conversation

@derek73

@derek73 derek73 commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes #1231

Adds locales.MY, an opt-in Burmese pack. Under it, U and Daw opening a name read as titles, and nine syllables that other languages read as particles stay name words. The pack is vocabulary plus its pack file. Nothing on the shared parse path changes: git diff origin/master --stat -- nameparser/_pipeline nameparser/_lexicon.py nameparser/_parser.py nameparser/_suggest.py is empty.

Input default parser_for(locales.MY)
U Thein Sein given U, middle Thein, family Sein title U, given Thein, family Sein
Daw Aung San Suu Kyi given Daw, middle Aung, family San Suu Kyi title Daw, given Aung, middle San Suu, family Kyi
Henry Van Thio family Van Thio middle Van, family Thio
U. S. Grant given U., middle S. title U., given S. (the accepted cost)

What it does

  • nameparser/vocab/my.toml gains u and daw as salutation readings written default = false, with their vetting on each word: U is a Korean surname and an initial, Daw a US surname.
  • nameparser/locales/my.py chooses my and carries a lexicon fragment, as locales.VI does for Vietnamese syllables. The fragment removes the particle readings of san, la, le, do, da, du, te, di and van, and do's credential reading. A vocabulary file cannot remove another file's reading. DEVIATES declares every name that holds one of the nine as a word.
  • Rosters: _REGISTRY, locales.available() (tests, docs, README), _ROTATORS, the CLDR LOCALE_FILES with a re-recorded cldr_agreement_locales.json, mechanisms.md#LOCALE-PACKS-PURE-DATA, decisions/vocabulary-model's Standing line, the locales AGENTS.md exemplar table, and docs/locales.rst's tables. The CLI's --locale and config_diff.py's plain:MY read the registry and needed no change.
  • Docs: a "Burmese names" section in docs/languages.rst, including when not to use the pack; rules/H1 gains an Accepted bullet for U Thant; and a dated entry in decisions/vocabulary-collisions.md holding every figure below with its recipe.

Decisions to confirm

These are the coordinator's working answers to the issue's five questions, plus decisions made while building it. Each lists what the other answer would cost.

  1. A pack, locales.MY, rather than a my.toml choice alone. The removals need a pack fragment, because a choice never makes a name reading settle a clash (decision 15 of decisions/vocabulary-model). The name: my is the BCP 47 tag of Burmese, and packs are named by language tag, with country packs adding a region (es_ar, pt_br). But MY is also Malaysia's country code, and the repository holds a Malaysian local corpus named my-candidates, whose language is Malay (ms). The docs and the pack docstring say so. Other answer: a name such as MY_MM or BURMESE would avoid the clash but break the language-tag convention every other pack follows.
  2. Ko, Ma, Maung and the ethnic prefixes (Saw, Sai, Nang, Naw, Khun, Mahn) stay name words. Other answer: making them titles would take a real given syllable from names such as Maung Maung Kyaw and Ko Ko Lwin. In the population below 47 names open with Maung, 14 with Ko, 14 with Ma, 72 with Saw and 94 with Sai. Their family names already read right, and only the title field would change.
  3. Decided 2026-11-19, reversing the working answer: U. with a full stop is read as the title vocabulary reads it. The working answer was that U. stays an initial under the pack. This PR first built that as a new rule, drafted as H11. It required a one-letter word written with its period, in a script with capitals, to be the initial it spells and never a title, at every reader of the title vocabulary. Two review rounds found it needed asking at more than a dozen readers on the shared parse path, so it was dropped. The reasons: a caller who chose the pack is reading Burmese names, and no Burmese list measured writes U. as an initial. Under the pack, an initial U. can be read as the title: U. S. Grant → title U., and Smith, U. and Dr. U. Smith → no given name. John U. Smith and Smith, John U. keep it an initial. The docs give this as a reason not to apply the pack to a mixed list, and tests pin it. Read a one-letter title only at the head of a name, with its period (H. Budi Santoso gives given H.; Indonesian H. and R.) #1205 asks the same of Indonesian H..
  4. No new machinery for U Thant. A title and one name word reads the word as the family, as rules/H1 reads it everywhere: title U, family Thant. It is recorded as an Accepted bullet in H1. Other answer: reading it as the given name needs a new switch or a pack-only rule (Policy.lone_name_word covers one-word names only).
  5. The military and religious styles stay out (Bogyoke, Thura, Thakin, Sayadaw, Ashin). In the population Thakin opens 7 names, Thura and Ashin 4 each, and Bogyoke and Sayadaw none (Sayadaw is written after the name in all 9 that hold it). Other answer: adding them as default = false titles would fix those few names, and each would need its own vetting.
  6. (Builder's choice) do's credential reading is taken out too. With san no longer a particle, AUNG SAN DO read suffix DO under the pack, where the default reads family SAN DO. This is the removal-unmasks-a-reading shape that nameparser/vocab/AGENTS.md warns about, and the review found it. VI removes it for the same reason. Other answer: keep the credential, so Jane Doe, DO keeps suffix DO under the pack (it now gives given DO), and Burmese names in capitals ending in DO lose that syllable to the suffix.
  7. (Builder's choice) The other credential syllables are left alone. Burmese names in capitals end in PE, LAT, RA, EI and SI, which are read as credentials both by default and under the pack: 12 names in the population once every name is upper-cased. These are proposed as a follow-up issue.

Measured (2026-11-19, the pack's final state, on master 6560abde)

The Myanmar population. It was rebuilt by the issue's recipe in a scratch folder, and nothing was cached or committed. The sources are OpenSanctions' sanctions and peps targets.simple.csv, persons with mm among their countries (names and aliases), plus Wikidata's English labels of people with Myanmar citizenship and a Burmese label. That gives 2,990 clean Latin names. config_diff.py reads only the committed and local corpora, so a scratch probe stands in for it.

  • 154 names move: 152 from a misreading to the issue's intended reading, 0 the other way, 1 between two right readings (Sir U Thwin) and 1 between two wrong ones (two names in one string).
  • Intended reading (an opening U/Daw, with or without its full stop, as the title, and the last word as the family): 2,835 of 2,990 by default (94.8%), 2,987 under the pack (99.9%).
  • Still wrong under the pack: two names ending in Ra, read as the credential RA (Khar Ra, the same by default), and the joined string.
  • The metric cannot see titles that take a name word: Mg, Maung written short, is read as the military MG in 10 names, the same as by default (Should Mg, Maung written short, read as a given name? (Mg Mg Aye gives title 'Mg Mg') #1232).

The cost to names that are not Burmese (the docs say when not to use the pack):

  • Committed corpora: 279 of 7,644 names move.
    • 4 open with U, U. or Daw: Daw Thida, U Kyaw Win, H1's U Thant, and the Western initial U. S. Grant.
    • 3 hold a period-joined U chunk, which now reads as a title: John Smith J.u.n.i.o.r., John Smith U.S. Dean., and U.S. and U.K. Ambassador Jane Doe.
    • The rest are the syllables: van 130, da 20, do 19 and la 11.
    • 4 of those lose the given name after a comma, because a removed particle in the family no longer keeps the given part from reading as a credential: Van Buren, Ed gives suffix Ed, and De La Cruz, M.J. K.L. gives suffix M.J. K.L.. This is recorded and tested as a cost.
  • FEC: 16 of the 351 names holding U or U. as a word move, and 3 of those lose their given name.
  • Local corpora: TSE's Brazilian donors 116,114 of 848,351, PSC 3,859 of 1,034,888, UK donors 22 of 15,214.
  • Scored against filers' own boxes with config_diff.py score default plain:MY, share of records with every box agreeing:
Country ORCID PatentsView
Netherlands 94.05 → 83.34 96.74 → 79.47
Belgium 95.29 → 89.03 97.34 → 89.94
Italy 97.05 → 95.13 98.38 → 96.99
Brazil 49.61 → 48.11 75.74 → 73.72
Portugal 71.79 → 71.24 57.55 → 54.89
France 94.52 → 93.35 98.00 → 96.63
Vietnam 68.50 → 67.23 90.26 → 94.05
Myanmar 85.05 → 85.39 —

The US, UK, Spain, the Philippines and Mexico each move by 0.4 of a point or less. ORCID cannot measure the honorifics: its Myanmar holders open no box with U.

  • CLDR: the CLDR locale view's my file is in Burmese script, and reads 19/24 with and without the pack.

The default is untouched. Against origin/master, the committed snapshot.jsonl and corpus_rules.jsonl each gain one line, rules/H1's new U Thant example, and change none. tools/perf/call_count.py --against origin/master reads 197.72 on both sides.

Sweeps

Every comma shape (none, full, one word, empty head, past the second comma), all three orders, and Title case, capitals and lower case. Also covered: dotted Daw. and U. (opening, after a comma, in brackets, ending the name), each syllable in mixed case and in capitals, DO after a family comma beside its mixed-case control, and a removed particle opening the part before a comma. u and daw are ASCII; the DEVIATES cut treats a combining mark as a boundary, which over-declares.

Checks

uv run pytest (run without the ja extra, which is absent from this venv), uv run pytest -n0 -m serial, uv run mypy, uv run ruff check, uv run sphinx-build -b doctest docs and -b html, python -m doctest README.rst, and the changed test modules on Python 3.15 in a separate environment.

Review

Every applicable pr-review-toolkit agent reviewed the PR, plus the design-docs-reviewer, and each fix commit was reviewed again.

  • Round 1: code-reviewer, pr-test-analyzer (with mutations), comment-analyzer, code-simplifier and design-docs-reviewer (all twelve axes). Findings fixed in d5c7e4d and 10edc1d:
    • the drafted rule's veto was missing from most readers;
    • AUNG SAN DO read suffix DO under the pack;
    • the probe's detector scored a leading U. as right;
    • stale figures and over-claims in the docs.
  • Round 2 (the fix commits): code-reviewer and design-docs-reviewer. Findings fixed in eb87f47:
    • four more unvetoed readers;
    • doc gaps: do's credential, the scope list, the capitals recipe.
  • Rule dropped: the coordinator's decision removed the drafted rule (f29a4da, 5de2639).
  • Round 3: code-reviewer and design-docs-reviewer over the final diff against master. Findings fixed in 07d4264:
    • the U. cost recorded wherever the title vocabulary reads a title, not only opening a name;
    • the comma cost of a removed particle (Van Buren, Ed), new to the record;
    • decisions 6 and 15 updated to name both removing packs;
    • the Thakin and Mg counts corrected.
  • Round 4 (07d4264): code-reviewer found it clean. design-docs-reviewer found errors in the fix, corrected in fa2d5fc:
    • de la overstated;
    • the comma cost undercounted (3, not 4) and too narrow (initials too);
    • Dr. U. Smith missing from the U. sites;
    • an FEC figure with no recipe;
    • a test comment contradicting its row;
    • the H1 bullet's mechanism.
  • Round 5 (fa2d5fc): design-docs-reviewer. It found the de la sentence and the lists of U. positions still incomplete, an FEC regex that also matched U chunks inside joined words, my.toml and the release log still narrow, and the Sayadaw doc line wrong. Fixed in the next commit, which states the costs in general terms with examples instead of position lists.
  • Round 6 (f69a93e): design-docs-reviewer found three wordings too narrow or too wide, corrected in 87a7a55.
  • Round 7 (87a7a55): design-docs-reviewer found "wherever a title is read" false the other way, corrected in 32f1d8c, which states the U. cost by examples and claims no complete list.
  • Round 8 (32f1d8c): design-docs-reviewer found a test comment and one decisions clause still in the retired form, corrected in 8756189.
  • Round 9 (8756189): design-docs-reviewer: clean.
  • Skipped as inapplicable:
    • silent-failure-hunter: no error handling or fallback.
    • type-design-analyzer: no new type; the pack is a Locale instance.

🤖 Generated with Claude Code

derek73 and others added 13 commits November 19, 2026 11:42
…ept name words (#1231)

my.toml gains the salutations u and daw written default = false, and
locales.MY chooses my with a lexicon fragment taking out the particle
readings of san, la, le, do, da, du, te, di and van, Burmese name
syllables, as locales.VI's takes out Vietnamese ones. DEVIATES declares
every name holding one of the nine as a word.

rules/H11: a one-letter title written with its period is the initial it
spells where the letter has a capital, at classify's title tag and the
period-joined derivation's chunk test, so U. S. Grant, U.S. Grant and
Grant, U.S. read as the default reads them under the pack. The default
holds no such title, so no default parse moves; the committed snapshot
gains the rule examples only.

Registered, with contents, removal, comma-shape, order and U. tests,
rotators, case rows, H11 tests with negative controls, and the CLDR
locale view's my file (19/24 with and without the pack).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rules/H11 and decisions/H11 state the one-letter title veto; rules/H1
gains the Burmese title-and-one-word cost; decisions/vocabulary-
collisions gains a Standing line and a dated entry with the population,
its recipe and the pack's cost on other names; mechanisms.md and the
locales AGENTS.md name the second removing pack. docs/languages.rst
gains a Burmese section with when not to use the pack, docs/locales.rst
and README.rst the pack's rows, the release log a bullet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tial under MY (#1231)

The review found U. still read as a title through the comma count (U.
Smith, Ed reversed), the title phrase (Vice U. Smith), the glued-stop
cut (Dr.U. Smith), the set-apart clause ((U.) Smith), C2's third part
(its report lost) and the group suggester. _lexicon._spells_a_cased_initial
is now the one predicate, asked after each reader's membership hit and
a C-level length test, so only a one-letter title pays a frame;
_vocab._title_chunk is folded back into its two callers. The H8,
given-title and trailing-title tags take the veto too, and the title
phrase reads a vetoed word as no title and no phrase member.

Tests: a 288-row two-input invariant (a caller's q title against the
default, every comma shape, order and reader) with its recorded control
(228 rows move with the veto off); every kind of title reading a caller
can write; a Greek capital; the reviewers' U. shapes under MY, with
ambiguities compared; the suggester.

locales.MY also takes out do's credential reading: with san no
particle, AUNG SAN DO read suffix 'DO' (nameparser/vocab/AGENTS.md, "A
reading taken out"). rules/H11 is rewritten: the Bengali case a
boundary, the chunk bullet reworded, the Because's universal dropped,
and a Burmese U written with its stop recorded as accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
decisions/H11 names every reader the veto is asked at, the invariant
and its control, and the Burmese U written with a stop as accepted.
decisions/vocabulary-collisions re-takes its figures at the fix commit
(committed 273 of 7,656, TSE 116,114, PSC 3,859), counts the fixes by
word over the 151 fixes, scores a leading U. by the parse, records do's
credential, the Maori Te and the other credential syllables, and
corrects Britain's figure. vocabulary-model's Standing line names MY
beside VI. docs/locales.rst's scope list reaches a comma part and
Filipino names, its table is in order; docs/languages.rst names the
nine words' cost exactly, do's credential and U written with a stop;
the release log's limit sentence names the words; my.toml's notes no
longer claim a universal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e lesson (#1231)

The fix commit's code and design-docs reviews found four more readers
still claiming U. under the pack or a caller's one-letter title: T8's
two tests of the word before a glued one (Juan dela U. Sta.Maria read
family 'dela U. Sta.Maria'; U. J.Smith lost its report), the Thai
glued-title walk (U. นายสมชาย), classify's title-phrase fork (a false
title-or-name report) and a title run's addressing by its last word
(Mr. and Q. Smith). Each now asks the predicate; the invariant grid
gains their shapes (360 rows, control 279, each module's veto seen),
the phrase test compares ambiguities, and a run test pins the
addressing. rules/H11 gains Accepted rows for U.Daw and the fullwidth
stop; decisions/H11 names the reads left out and why. docs/locales.rst
and mechanisms.md name do's credential among the fragment's removals,
the scope list reaches a U after a title, the capitals figure states
its recipe, and nameparser/AGENTS.md records the class: a veto on a
vocabulary set reaches every reader of the set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1231)

Decided 2026-11-19, reversing the working answer that U. with a full
stop stays an initial under the pack: a caller who chose the pack is
reading Burmese names, no Burmese list measured writes U. as an
initial, and vetoing a one-letter dotted title at every reader of the
title vocabulary was new machinery on the shared parse path. The
pipeline, _lexicon, _suggest and their tests return to master's;
rules/H11 and decisions/H11 are removed with their index lines and the
nameparser/AGENTS.md paragraph they earned. Under the pack U. Thein Sein
and U. S. Grant now read title 'U.', pinned as the accepted reading in
tests/v2/test_locales.py and the case rows; my.py, my.toml and
docs/languages.rst say so as a reason not to apply the pack to a mixed
list, the release log too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l state (#1231)

decisions/vocabulary-collisions: a Standing clause and a bullet record
that U. is read as the title vocabulary reads it under the pack,
decided 2026-11-19, reversing working answer (3), with the reason and
what the drafted rule had required; the population re-taken (154
moved, 152 fixed, 0 broken; 2,835 to 2,987 of 2,990), the committed
corpora (279 of 7,644, the U. and period-joined costs named), and the
Accepted bullet's U. and J.u.n.i.o.r. costs. The snapshot and the rules
corpus differ from master by rules/H1's U Thant example alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The final review found the record narrower than what the pack does. U.
is the title wherever the title vocabulary reads one, after a family
comma (Smith, U., the given name lost), in brackets, in Grant, U.S. and
glued to a title, and Daw. ending a name, not only opening it; and a
removed particle opening the family before a comma lets a short given
name after it read as a credential (Van Buren, Ed). The decisions entry,
my.py, docs/languages.rst and docs/locales.rst now say so, tests pin
Smith, U., John (U.) Smith and the comma cost, and a rotator holds the
trailing Daw.; nameparser/vocab/AGENTS.md's "A reading taken out" names
the comma shape. Decisions 6 and 15 of decisions/vocabulary-model name
both removing packs. Corrected: Thakin opens 7 names, Mg reads a title
in 10, the committed count's tree, and rules/H1's bullet credits the
title's addressing, not position.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/languages.rst no longer says de la loses its la (it reads as by
default save ending the given part after a family comma). The comma
cost counts 4 committed names and reaches a given part of initials
(De La Cruz, M.J. K.L.), now a test row; the vocab AGENTS.md lesson
asks for both. An initial U. behind a title is the title too (Dr. U.
Smith), in my.py, languages.rst, the decisions entry and a test row.
The FEC figure is replaced by a recipe that counts the names the pack
moves (22 of 409). A test comment no longer contradicts its row,
rules/H1's bullet credits the title being no given-name title, and
Sayadaw's 9 names are written after the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round five found each list of positions still short. The docs, my.py,
my.toml, the release log and the decisions entry now say U. is the
title wherever the parser reads a title, with examples, and that only a
bare U. between two name words stays an initial; docs/languages.rst
says de la reads as by default in Juan de la Cruz and can read
otherwise in other shapes, and that Sayadaw is a name word as by
default. The FEC figure counts names holding U as a word only (16 of
351 move, 3 losing their given name), its regex no longer matching U
chunks inside joined words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/languages.rst: a U. among or ending the given names stays an
initial (Smith, John U.), not only one between two name words; a Korean
surname U reads as the title written with no comma (U Minjun), not
after one (U, Minjun). docs/locales.rst's table row says the pack reads
U and Daw as titles wherever a title is read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1231)

Round seven found "wherever a title is read" false in the other
direction: a U. ending a name, and U or Daw ending the given part after
a family comma, stay name words. docs/locales.rst's row now gives an
example, and docs/languages.rst, my.py, my.toml, the release log and the
decisions entry say an initial U. can be the title, with examples on
both sides, claiming no complete list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test comment over the accepted U. readings no longer claims
"wherever it reads a title", and the decisions entry's list of places
says a U. ending the name stays a name word, where Daw. reads as the
title, instead of likening the two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.2 milestone Nov 19, 2026
@derek73 derek73 added vocabulary Fixed by a word-list entry: per-word vocabulary and language packs titles Titles and honorifics (rules/H) locale-packs Locale packs and language choices (nameparser.locales) labels Nov 19, 2026
@derek73 derek73 self-assigned this Nov 19, 2026
@derek73
derek73 merged commit 4b0b944 into master Nov 19, 2026
14 checks passed
@derek73
derek73 deleted the claude/issue-1231-burmese-pack-39db4d branch November 19, 2026 21:11
derek73 added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

locale-packs Locale packs and language choices (nameparser.locales) titles Titles and honorifics (rules/H) vocabulary Fixed by a word-list entry: per-word vocabulary and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should a Burmese choice read U and Daw as titles, and stop San joining the family? (Daw Aung San Suu Kyi gives given 'Daw', family 'San Suu Kyi')

1 participant