Skip to content

Read Qari, Moulana, Alhaj and Alhajj opening a name as titles (#1469) - #1498

Merged
derek73 merged 4 commits into
masterfrom
feat/religious-honorifics
Nov 20, 2026
Merged

derek73 merged 4 commits into
masterfrom
feat/religious-honorifics

Conversation

@derek73

@derek73 derek73 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Relates to #1469 (it stays open for whether a Bengali or Urdu choice reads Hafiz, Hafez, Haji and Maulana as titles).

What changes

  • Qari, Moulana, Alhaj and Alhajj are titles by default, in nameparser/vocab/ar.toml: qari and moulana as religious titles, as mufti is; alhaj and alhajj as styles, as hajji and bn.toml's আলহাজ্ব are. parse("Qari Ahmed Khan") gives title Qari, given Ahmed, family Khan, where 1.4.0 through 3.1.0 gave given Qari, middle Ahmed.
  • Hafiz, Hafez, Haji and the spelling Maulana are left out. Each is borne as a given name in Pakistan, Indonesia, Tanzania, Iran or Egypt. Their title reading is right in Pakistani, Bangladeshi and Malaysian lists and wrong as a default, so no excluded entry is written (the vocabulary README defines that as wrong in every language). A default = false reading in bn.toml would be turned on by locales.BN, or one in ur.toml by a caller's choice of ur. Neither is written here.
  • Syed, Mian, Chaudhry and Makhdoom stay name words, by their counts.
  • Recorded in: decisions/indic-honorifics (2026-11-19 Should Hafiz, Haji and Maulana opening a name read as titles under a Bengali or Urdu choice? (Hafiz Ahmed Khan gives given Hafiz) #1469 entry, with its Standing and Open lines), case rows, a docs/migrate.rst "Changed in 3.2" entry with doctests, and one release-log bullet.

The counts

ORCID's 2025 extract, given box / family box:

Word Given Family Read as
qari 9 43 title
moulana 6 16 title
alhaj 17 269 title
alhajj 5 47 title
hafiz 2,300 (Pakistan 600) 371 left out
maulana 971 (Indonesia 531) 1,231 left out
haji 232 (Tanzania 13) 1,178 left out
hafez 245 (Iran 30, Egypt 28) 564 left out
syed 9,229 2,725 name word

Openers. Every name counted that opens with one of the four titles is the title, save one ORCID byline that writes the family name Alhaj first.

Box agreement. config_diff.py score, per country, can't decide a title: filers type the honorific in the forename box. As a default title, hafiz would lower ORCID PK from 93.59 to 92.94 and PSC Pakistani from 94.27 to 93.35. The four titles cost at most 0.01 points in any group.

Measured

tools/differential/measure.py --base <master>, 30 steps:

  • No moves in the committed snapshot, CLDR and GND agreement, or any local corpus but four: FEC, ClinicalTrials.gov and my-candidates move nothing. The snapshot needs no re-record.

  • 74 names move, every one the honorific going from the given name to the title:

    Corpus Names By word
    JRC-Names 55 qari 53
    opensanctions-parliaments 2 both moulana, Pakistan's National Assembly
    orcid-researchers 7
    psc-individuals 10
  • Fourteen names keep a single name word, and it reads as the family (rules/H1).

  • Agreement. psc-individuals loses 10 records and orcid-researchers moves 3 (the forename box holds the honorific). JRC-Names now reads the spellings of 8 people differently, with and without the title.

Checks

  • Full suite: passes without the ja extra (52,380).
  • Lint, types and vocabulary: ruff, mypy and build.py --check are clean.
  • Doctests: Sphinx doctests (1,429) and README pass.
  • Parity: parity_check.py finds 0 of 687 rows reading otherwise under 1.4.0.
  • New rows: the 8 feat(#1469) case rows fail on master.

Reviews

  • First commit: code-reviewer, pr-test-analyzer and design-docs-reviewer.
  • First fix commit: a design-docs review, which led to the second fix commit:
    • the entry's claim that no pack could make a Bengali choice (locales.BN can);
    • how the two-word movers read;
    • the Alhaj byline;
    • the phrase-only reading of maulana;
    • corpus names quoted in the entry.
  • Second fix commit: a design-docs review, which found it clean.

ar.toml is also being edited for #1149; this branch is rebased on current master, and a later rebase regenerates the compiled files.

Merged with master after #1497

#1497 (Arabic titles, #1149) landed first and also edits ar.toml, the compiled vocabulary, cases.py, the snapshot and the release log. Master e0f698c8 was merged in (b6402e35), not rebased:

  • docs/migrate.rst: the one text conflict. Each branch added a 3.2 section, and both are kept.
  • Generated files: ar.toml, cases.py, the release log and the snapshot merged without conflicts. The compiled vocabulary was regenerated with tools/vocab/build.py, and the result was byte-identical to the merge. The snapshot did not need re-recording: this change moves no committed corpus name, and the snapshot test passes.
  • Checks: the suite passes (52,782 passed, run without the ja extra), as do ruff and mypy, build.py --check, the Sphinx doctests (1,439, 0 failures) and README.
  • Re-measured: measure.py --base against e0f698c8 gives the figures recorded above, unchanged:
    • local snapshot moves: JRC-Names 55, opensanctions-parliaments 2, orcid-researchers 7, psc-individuals 10
    • box agreement: PSC regression 10, ORCID changed 3
    • JRC-Names: 8 persons now apart
    • every other step reports no moves

🤖 Generated with Claude Code

derek73 and others added 3 commits November 19, 2026 20:39
Qari, Moulana, Alhaj and Alhajj, the religious titles written before a
name in Pakistan and Bangladesh, are titles by default in ar.toml: every
name counted that opens with one is the title. Hafiz, Hafez, Haji and the
spelling Maulana are left out, borne as given names in Pakistan,
Indonesia, Tanzania, Iran and Egypt; their title reading wants a choice
of Urdu or Bengali that no pack makes. Syed, Mian, Chaudhry and Makhdoom
stay name words. decisions/indic-honorifics' 2026-11-19 #1469 entry holds
the counts and the measured moves.

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

locales.BN already turns on bn.toml's default = false readings, so the
entry no longer says no pack could carry Hafiz, Hafez, Haji and Maulana;
it says which choice would and that neither is written here. The
measured moves now say the 15 two-word names read the remaining word as
the family, one ORCID Alhaj opener is a byline writing the family name
first, maulana as a phrase-only title would move a style-led name, and a
strict choice drops ar.toml as it does for mufti. Corpus names in the
entry are replaced by invented shapes. New rows: a one-word name and a
full name before a comma, the given part's last word, a title behind a
kept Hafiz, and Hafez.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed row names

The Standing line now carries the surname-first byline the Log records;
the names left with one name word are counted as measured (14: 12 of two
words, 2 behind Mr); and the entry and the case rows no longer quote a
corpus record or a name part that is one.

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) labels Nov 20, 2026
@derek73 derek73 self-assigned this Nov 20, 2026
Both branches added a 3.2 section to docs/migrate.rst; both are kept.
ar.toml merged cleanly, and a fresh vocabulary build was byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 36da043 into master Nov 20, 2026
14 checks passed
@derek73
derek73 deleted the feat/religious-honorifics branch November 20, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant