Skip to content

Read Ab opening a name as the given name, not the title Airman Basic (#1178) - #1523

Merged
derek73 merged 4 commits into
masterfrom
feat/ab-given-name
Nov 22, 2026
Merged

derek73 merged 4 commits into
masterfrom
feat/ab-given-name

Conversation

@derek73

@derek73 derek73 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Closes #1178

ab was en.toml's military title, Airman Basic, with no name reading, so it was the title opening every name and the part after every family comma. Rules/H2's shape also made the written-short Ab. a title. #1383 already made Md and Md. Muhammad written short; this PR does the same for Ab, decided 2026-11-21.

The change

  • ms.toml: ab gets a given reading with same_as = "abdul" (Abdul written short). H2's shape yields to it, as it does to Chas., and T8 divides it where it is glued (Divide a word glued to the next at its full stop, before any comma (rules/T8) #1304).
  • nl.toml: ab gets a plain given reading, the Dutch name in its own right (short for Abraham or Albert). It also reads undotted initials (AB Jansen) as the given name.
  • The name match: with both readings the word is in SAME_AS_NAMED, so the match follows its link to Abdul only where Ab. is written with its full stop.
  • en.toml: the military reading is now default = false. A plain English choice turns it on, but the two name readings gate it (rules/H9). Only a strict English choice reads the rank alone (AB John Smith); any choice of English reads it inside a title phrase (rules/H9, Chief Ab Smith → title Chief Ab). ab joins en's row of STRICT_UNGATED in tests/v2/test_reading_index.py, because a strict choice reads neither ms.toml nor nl.toml. A strict choice of English that also chooses ms or nl gates it as a plain one does.
  • Why not mul.toml: every strict choice reads mul.toml, so a name reading there would gate the rank under strict English too.

The grid (on the tree)

Input master 6ff048f default plain en strict en strict ms / MS strict nl / NL
Ab Faizal Mohd Qirwan title Ab given Ab, middle Faizal Mohd as default title Ab as default as default
Ab. Ghani Harun title Ab. given Ab., middle Ghani as default title Ab. as default title Ab. (H2's shape)
Ab.Ghani Harun title Ab. given Ab., middle Ghani (T8) as default title Ab. as default given Ab.Ghani
Ab Jansen title Ab given Ab as default title Ab as default as default
Jansen, Ab title Ab given Ab as default title Ab as default as default
AB Jansen title AB given AB as default title AB as default as default
AB John Smith title AB given AB, middle John as default title AB as default as default
John Smith, AB title AB, given John, family Smith given AB, family John Smith as default as master as default as default
John Smith AB family AB family AB as default as default as default as default
John Smith, A.B. given A., middle B., family John Smith unchanged unchanged unchanged unchanged unchanged

Plain MS and NL read as the default. Under both family-first orders, Ab opening a name is the family (Ab Jansen → family Ab), placed by the order once no title takes it.

Things to watch

  • John Smith, AB reads given AB, family John Smith: the A.B. degree alone after a full name is the given name Ab, which gives the fields an unlisted pair of capitals gives. John Smith, Ab and John Smith, AB. reverse the same way; an unlisted XY. would stay a title, but H2's shape now yields to AB.. On master (and from 2.2.0) it read title AB with the names right. This affects 4 ClinicalTrials.gov names. No credential reading is added; NPPES writes the degree 14 times in 4.8M providers.

    • In a run of credentials, AB now joins the suffix (John Smith, MD, AB → suffix MD, AB, as 1.4.0 read it): 12 names.
    • With no comma it stays the family, as on master (John Smith AB).
    • A.B. written with its stops is unchanged: initials before a comma, the family at the end.
  • T8's glued form divides (Ab.Ghani Harun → given Ab., middle Ghani), as Md.Delowar has since Should Mohd Rahman match Mohammad Rahman? #1383. The period-joined-words Open line for Read Ab at the head of a name as a given name, Abdul written short (Malay Ab Hamid Mohd Nazahar gives title Ab) #1178 is retired with a Log entry. What it also named stays as it was, with no issue open: unlisted stubs (Gio.Batta, which no local corpus writes) and the Devanagari मो..

  • The name match:

    • Ab. Rahman / Abdul Rahman is now listed-spelling, consistent (master: given-one-side).
    • Written bare, Ab Rahman / Abdul Rahman is a conflict, because Ab is also the Dutch name, which is not Abdul.
    • Ab. Hamid Rahman / Abdul Hamid Rahman is a conflict, because Abdul joins the next word (rules/P5) and ab does not (below).
    • match_diff.py --base: 8,294 of 691,218 rows move, every one a pair holding an ab name. The key guarantee holds (0 consistent pairs share no key).
  • Not joined like Abdul. Ab Faizal Mohd Qirwan reads given Ab, middle Faizal Mohd, where Abdul Hamid ... reads given Abdul Hamid. A bound_given reading in ms.toml would join it, but it would also join a Dutch Ab to a second given name (Ab Pieter Jansen → given Ab Pieter, probed with Lexicon.add). I left it undecided and recorded it as a cost; it may be worth its own issue.

  • The Bengali মোঃ (the issue's first comment) is unchanged, left to an issue of its own.

  • Further moves the reviews found, each now a case row and an accepted cost in the decisions entry:

    • A glued word whose last chunk is AB becomes rules/S3's suffix: Ali Budi Santoso.AB → family Budi, suffix Santoso.AB.
    • C4's count now treats Ab. as a name word, as Should Chas. Smith read given Chas.? Abbreviated given names read as titles today #789 did for Chas.: Ab. Smith, Ed → suffix Ed. A title modifier before it is a name word (Vice Ab. Smith, Ed → given Vice).
    • AB Jansen's initials() gives A. J., not two initials.
    • Ab Jansen / Abraham Jansen is a conflict, since no familiar pair links them.
    • A plain English choice reads the default's fields, with a title-or-name report where Ab opens a name.
    • Under strict ms, the bare Ab Rahman / Abdul Rahman is listed-spelling.
    • Chief Ab Smith reads title Chief, given Ab by default, and title Chief Ab under any choice of English.

Measured (2026-11-21, against master 6ff048f)

  • Bearers (tools/name_usage.py ab --boxes, --country MY, --country NL):
    • ORCID: given box 332 (Malaysia 30, India 25, Indonesia 13); family box 796 (Malaysia 323, the father's name after bin).
    • PatentsView: 14 given, 13 family.
    • Wikidata: 81 given names (the Netherlands 48).
    • Elsewhere: US SSA 380 male births; nam_dict band 4 in the Netherlands alone.
  • Names holding the word (config_diff.py diff default plain:en strict:en plain:MS strict:MS plain:NL strict:NL --committed --local all --match '(?i)(?<![^\W\d_])a\.?b\.?(?![^\W\d_])' --readings in both trees, compared line by line): 413 local and 7 committed names hold it.
    • No committed name moves.
    • By default, and under each plain choice, 57 move. Strict en and strict NL move none; strict MS moves 5 (Ab. opening a name 1; a glued Ab.X ending a name 4).
    • The committed count of 7 was taken before the two new rule examples (9 with them).
    • The 57 by default:
      • Ab/AB opening a name, from title to given name: 28 (16 Abdul written short, 4 Dutch, 5 written as initials, 3 others).
      • Opening the family before a family comma: 2 (Ab Rahman, Siti → family Ab Rahman).
      • The given name after a family comma: 8.
      • Joining a credential run: 12.
      • Full Name, AB reversing: 4.
      • A trailing AB. now the family: 1.
      • A word glued at three stops, from family to suffix (rules/S3): 1.
      • An ambiguity only: 1.
  • Every corpus check (measure.py --base, 30 steps, none failed):
    • The committed snapshot and the CLDR and GND records do not move.
    • The local snapshots move 60 names: ctgov-contacts 9, ctgov-officials 12, fec 6, jrc 7, my-candidates 3, orcid 20, patentsview 2, tse 1.
    • Box agreement breaks no record. ORCID gains 2 records, 2 others move among misses, and 10 leave the "title typed into the given box" count (Ab 7, AB 2, Dr. 1). PatentsView gains 1, and 1 leaves that count (Ab.); PSC and cz-candidates do not move.
  • parity_check: 0 of 792 parity rows read otherwise under 1.4.0.

In the same change

  • Decisions: decisions/vocabulary-collisions gets a Standing line and a Log entry "Decided 2026-11-21" with the readings, the costs and the measurements. decisions/period-joined-words' Open line for Read Ab at the head of a name as a given name, Abdul written short (Malay Ab Hamid Mohd Nazahar gives title Ab) #1178 is retired with a Log entry, and decisions/indic-honorifics' pointer is updated.
  • Rules examples: rules/H2 (a leading abbreviation is a title, save a given name written short) gains Ab. Ghani Harun; rules/T8 (a word glued to the next at its full stop) gains Ab.Ghani Harun.
  • User docs: a docs/migrate.rst section with a restore recipe, and the 3.2 table entry; a release log bullet.
  • Tests:
    • tests/v2/cases.py: 29 rows.
    • test_parser.py: a choices test.
    • test_match.py: name-match rows with a negative control, and ab in the mark's rows.
    • STRICT_UNGATED gains ab.
    • A test_local_agreement row that used AB as a title now writes LT.
  • Records: the rules corpus is regenerated and the snapshot re-recorded (two new example names, nothing moved).

Checks

  • Suite: 57,387 passed, 47 skipped, 3 xfailed.
  • Lint, types, vocabulary build: ruff and mypy are clean, and build.py --check is current.
  • Doctests: 1,527 Sphinx doctests with 0 failures; README ok.

Reviews

  • First round (four aspects on bb01a01e):
    • code-reviewer: the 1.4.0 note on John Smith, AB was wrong, and the reversal also reaches Ab and AB..
    • pr-test-analyzer: unpinned moves (C4's count, trailing AB., strict-ms matching, Ab bin Hassan, the plain-en report, Chief Ab, FAMILY_FIRST_GIVEN_LAST).
    • comment-analyzer: version ranges in two notes, "read as initials" (it is the given name), two real names among the inputs, release-bullet trim, and which strict choice reads the rank.
    • design-docs-reviewer: the glued X.AB family-to-suffix move, the strict-MS figure, the titled-out sum, the committed count, the plain-choice report, decisions/T8's मो. pointer, and name-matching's pointer.
    • All fixed in 1029d77c.
  • Fix commit 1029d77c (code-reviewer): it found three issues, fixed in the next commit:
    • the "rank only under strict English" claims missed the title phrase Chief Ab, which every choice of English reads;
    • the strict-MS split was mislabelled;
    • a row name no longer fit its invented input.
    • It also found two wording nits.
    • Everything else, every wheel note included, it verified against 1.4.0 and 2.0.0 through 3.1.0.

🤖 Generated with Claude Code

…1178)

`ab` was en.toml's military title (Airman Basic) with no name reading, so
it was the title opening every name and the part after every family
comma (`Ab Hamid Mohd Nazahar`, `Ab Jansen`, `Jansen, Ab`, `AB Jansen`),
and rules/H2's shape made the written-short `Ab.` a title too.

- ms.toml gives `ab` a given reading with same_as abdul, Abdul written
  short, which H2's shape yields to and T8 divides glued; nl.toml a
  plain given reading, the Dutch name of its own, so the word is in
  SAME_AS_NAMED and the name match follows its link to Abdul only where
  it is written with its full stop.
- en.toml's Airman Basic is written default = false: a plain English
  choice reads it gated by the name readings (rules/H9), a strict one
  reads `AB John Smith` as the rank; `ab` joins en's STRICT_UNGATED row.

Docs in the same change: a decisions/vocabulary-collisions Standing line
and Log entry (decided 2026-11-21, the measurements, the accepted costs),
rules/H2 and T8 examples, the period-joined-words Open line for #1178
retired, indic-honorifics' pointer, a migrate.rst section and the 3.2
release log bullet; cases.py rows, a choices test in test_parser.py,
name-match rows, the rules corpus and snapshot re-recorded (two new
example names). A local_agreement test row that used AB as a title now writes LT.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@derek73 derek73 added this to the 3.2 milestone Nov 22, 2026
@derek73 derek73 added enhancement vocabulary Fixed by a word-list entry: per-word vocabulary and language packs titles Titles and honorifics (rules/H) labels Nov 22, 2026
@derek73 derek73 self-assigned this Nov 22, 2026
derek73 and others added 3 commits November 21, 2026 22:33
…d names

- Case notes: `John Smith, AB` read title 'AB' with 'John Smith' whole in
  1.4.0 to 2.1.0, `John Smith, MD, AB` the suffix through 2.3.0. Two
  inputs drawn from the local corpora are replaced with invented names.
- New rows for moves no row pinned: `John Smith, AB.`, `Smith, John, AB`,
  `Ab. Smith, Ed` and `Vice Ab. Smith, Ed` (C4's count asking H2's shape),
  `Smith, John Ab.`, `Aminah Siti AB.`, the glued `Ali Budi Santoso.AB`
  (now rules/S3's suffix), `Ab bin Hassan`, `Ab Pieter Jansen`, `Chief Ab
  Smith`, and FAMILY_FIRST_GIVEN_LAST; tests for the title-or-name report
  under a plain English choice, a strict en+ms choice, and the name match
  under strict ms and nl.
- decisions/vocabulary-collisions records costs 5 to 8, the plain-choice
  report, the strict ms match and the corrected figures (strict MS's five,
  the titled-out records, the committed count before the rule examples);
  "read as initials" becomes the given name Ab throughout.
- The release bullet is trimmed to its example and limits; migrate.rst,
  the vocabulary notes and the STRICT_UNGATED comment say which strict
  choice reads the rank; decisions/T8 and period-joined-words keep `मो.`
  and `Mo.` with no issue named, and name-matching's pointer is dated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…strict MS split

- Any choice of English reads the gated Airman Basic inside a title
  phrase (rules/H9: `Chief Ab Smith` → title 'Chief Ab'), so the release
  bullet, migrate.rst, en.toml's note and the decisions entry say the
  rank is read ALONE only under a strict English choice; two test rows
  pin the phrase under plain en and strict en+ms.
- The strict Malay figure's four glued words split 2 suffix → family,
  1 suffix → divided, 1 family → divided; the glued word has its stops,
  not three, and its row is renamed.
- ms.toml's note writes AB. with its full stop and "after a comma"; the
  release bullet names 1.4.0 through 3.1.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@derek73
derek73 merged commit d8d0b75 into master Nov 22, 2026
14 checks passed
@derek73
derek73 deleted the feat/ab-given-name branch November 22, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 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.

Read Ab at the head of a name as a given name, Abdul written short (Malay Ab Hamid Mohd Nazahar gives title Ab)

1 participant