Skip to content

Add locales.MS, a Malay pack: Puan, Cik, Ustaz, Ustazah and Cikgu as titles (#1179) - #1494

Merged
derek73 merged 2 commits into
masterfrom
feat/malay-salutations
Nov 20, 2026
Merged

derek73 merged 2 commits into
masterfrom
feat/malay-salutations

Conversation

@derek73

@derek73 derek73 commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Closes #1179

This adds a public pack, locales.MS (Malay). It is a plain choice of the language ms, with no lexicon fragment, no policy patch and no removal list. It turns on five readings that nameparser/vocab/ms.toml writes default = false, so the default parse does not move.

What changes

  • Read as titles under the pack:

    • puan (Mrs.) and cik (Miss), salutations;
    • ustaz and ustazah, religious teachers;
    • cikgu, teacher.

    parser_for(locales.MS).parse("Puan Siti binti Ahmad") gives title Puan, given Siti, family binti Ahmad. The default gives given Puan, as 1.4.0 through 3.1.0 did. Encik was a title by default already.

  • puan and cik carry after_given, as encik does, so Ahmad, Siti Puan reads title Puan (rules/H8).

  • tuan stays out, as an excluded entry, even under the choice.

    • Malaysians filing their own names write it first as a hereditary prefix, repeated before the father's name (Tuan Aminah binti Tuan Yusof): ORCID's and PatentsView's Malaysian records hold a leading Tuan in the given box 22 times out of 22. After bin it is a name word in 5 records of 5.
    • It is also a Vietnamese given name.
    • The only evidence for the salutation is a newspaper's honours list, 39 of 1,504.
    • Read as a salutation under the pack, it lowered every scored group: ORCID MY 76.72% → 76.70%, PatentsView MY 90.56% → 90.50%, and the Vietnamese groups by 0.5 to 1.5 points.
  • cik is verified as Miss, the open question from Salutations and titles in other languages read as given names: Herra Väinö Johansson gives given Herra #606, by the honours list Should Puan, Cik and Tuan read as salutations under a Malay choice? (Puan Hajah Ara binti Mohamed gives given Puan) #1179 measured.

Plain, not strict

nameparser/locales/AGENTS.md asks for this comparison before a pack removes another language's readings. The table compares the strict choice of ms with the plain one, counting records where every box agrees (config_diff.py score, 2026-11-19):

group plain strict
ORCID MY (18,811) 76.72 76.16
PatentsView MY (6,071) 90.56 90.59
Companies House, Malaysian (1,441) 83.69 84.59

Strict loses ar.toml's bound reading of Abdul (Abdul Hadi bin Awang gives given Abdul, middle Hadi) and English titles such as Sir and Lawyer. Malaysian lists mix Malay, Chinese and Indian names, so the pack is the plain choice.

Measured: the pack against the default

config_diff.py diff default plain:MS, 2026-11-19:

  • my-candidates: 117 of 3,077 names move, each to the title: USTAZ 69, CIKGU 41, USTAZAH 4, CIK 2, PUAN 1. The costs are accepted and recorded:
  • opensanctions-parliaments: 2 of 26,400 move: CIK UJANG, and Indonesia's PUAN MAHARANI. That second one is the cost of using the pack on Indonesian names, and the docs and release log say to keep the pack to Malaysian names.
  • committed corpora: 0 of 7,662.
  • ClinicalTrials.gov: 1 of 713,175.
  • Scored groups: no group's share moves among ORCID's, PatentsView's and Companies House's Malaysian, Indonesian, Singaporean and Vietnamese records.
  • CLDR: its ms file joins the per-pack record and is read exactly as by default.
  • Indonesian and Vietnamese choices: Puan Maharani and Tuan Nguyen read as before under the default and under an Indonesian or Vietnamese choice, with rows in the tests.

Abdul's join (#1464)

Not built here. Once the bound-word property lands, an ms.toml reading of abdul written default = false would let this pack turn it on. The reading must copy every other file's vocabulary reading of the word, as my.toml's lt does (#1483).

Docs

Checks

  • Full suite: 51,782 passed, run without the ja extra (namedivider is not installed).
  • Lint, types and vocabulary: ruff, mypy and build.py --check are clean.
  • Docs: Sphinx doctests and README pass.
  • Generated records: snapshot unchanged; the per-pack CLDR record was regenerated, not hand-edited.
  • New cases.py rows: fail on master, where no ms pack exists.

Reviews

  • On the first commit: code-reviewer, pr-test-analyzer, comment-analyzer and design-docs-reviewer. The second commit addresses their findings:
    • a citation pointing at the wrong decisions file;
    • a false strict example (Dr stays under strict);
    • the uncounted PUAN SRI move;
    • after_given on puan and cik;
    • the supersession markers;
    • a count of 109 that is really 110;
    • tests pinning the strict choice's cost, the H8 and H5 shapes, and the Puan Maharani and Puan Sri costs.
  • On the fix commit: a code review found nothing at threshold. Below threshold, it noted that the empty-head shape , Siti Puan, which now reads title Puan by H8, has no test row.

🤖 Generated with Claude Code

derek73 and others added 2 commits November 19, 2026 18:06
…titles (#1179)

ms.toml writes the five readings `default = false`, so the default does
not move, and locales.MS, a plain choice of `ms`, turns them on. `cik`
is verified as Miss by the honours list #1179 measured. `tuan` stays an
excluded entry under the choice too: Malaysians file it as a hereditary
prefix, part of the name, and it is a Vietnamese given name; as a
salutation it lowered every scored Malaysian and Vietnamese group.

Strict `ms` was measured against plain before choosing the pack's shape
(nameparser/locales/AGENTS.md): it reads ORCID's Malaysians worse, losing
Abdul's bound reading and the English titles, so the pack is the plain
choice and removes nothing.

Docs: a Malay section in docs/languages.rst with doctests, the packs
tables in docs/locales.rst, README's pack list, a release-log bullet;
decisions/salutation-titles gains the 2026-11-19 #1179 entry. CLDR's ms
file joins the per-pack record, read exactly as the default reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ost, counts

- Point the tuan and plain-choice citations at decisions/salutation-titles,
  where the #1179 entry is; ms.py's strict example names Sir and Lawyer,
  which strict drops, not Dr, which mul.toml keeps.
- puan and cik carry after_given, as encik does (rules/H8); positional
  H1 kept for a title and one name word, weighed in the entry.
- Record PUAN SRI reading given 'SRI' as an accepted cost (#1180), the
  117th my-candidates move, and the strict count 110.
- Tests pin the strict choice's cost (Abdul's join), the H8 and H5
  shapes, and the Puan Maharani and Puan Sri costs; rotators gain them.
- Mark #606's exclusions of pan, puan and cik superseded, and the
  vocabulary-exclusions reference line; keep the Standing bullet apart
  from the Elsewhere paragraph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.2 milestone Nov 20, 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 20, 2026
@derek73 derek73 self-assigned this Nov 20, 2026
@derek73
derek73 merged commit e502ffa into master Nov 20, 2026
14 checks passed
@derek73
derek73 deleted the feat/malay-salutations branch November 20, 2026 03:40
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 Puan, Cik and Tuan read as salutations under a Malay choice? (Puan Hajah Ara binti Mohamed gives given Puan)

1 participant