Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/design/decisions/H2-leading-abbreviation-title.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

Elsewhere: #316's question 2, a symmetric leading rule reading `Esq. Smith` as a suffix, is declined and the trailing slot reads vocabulary, decisions/H5's 2026-09-08 #316 entry (the undated `Decided 2026-09-08` paragraph below records the hook it closed here); the shape does not fire before a family comma, decisions/H6's 2026-10-17 #701 and 2026-10-18 #710 entries; a letter typed decomposed is the same letter to the shape, decisions/nfd-shapes' 2026-10-12 #652 entry, and the script veto reads the composed spelling, its 2026-10-13 #665 entry; halfwidth katakana is classified since #594 (decisions/W4); a given name written short opening the given part after a family comma (`Rahman, Md` → given 'Md'), decisions/C13's 2026-11-14 #1393 entry; one glued to the next word at its full stop, divided there (`Md.Karim Uddin` → given 'Md.'), decisions/T8.

- Declined: reading an unlisted abbreviation that alone fills the part after a full name and a comma as a post-nominal; the shape keeps it the title there (`John Smith, Insp.` → title 'Insp.', as in 1.4.0) — 2026-11-20 #969.

Open: none in this file.

## Log
Expand All @@ -38,3 +40,4 @@ Decided 2026-09-08 (was Open: [#316](https://github.com/derek73/python-nameparse
- **The glued word**, decisions/period-joined-words' entry of this date: the set is also what that file counts as a chunk read on its own.
- **Its signal.** The clause reads neither the shape nor the script but a closed list of spellings, held in code (`_vocab._DIGRAPH_INITIALS`) rather than in the vocabulary, so a caller cannot remove a member from the set, but restores the title reading by listing the word as a title, which outranks the shape (`Lexicon.default().add("yu", kind="title")` reads `Yu. A. Chibrikova` title 'Yu.'), and a caller's `given` reading with `same_as` still reaches any word. It is a third reading beside the shape and the two script vetoes the #1191 entry names, which adds to the question a split of H2 would settle; a reading property in the TOML marking an initial was not weighed against it, only `same_as`.
- 2026-11-16 #1393 — THE READING ACTS BEYOND THE HEAD OF A NAME. The 2026-10-26 #789 line said a given name written short acts nowhere but where H2's shape would fire; decisions/C13's 2026-11-14 #1393 entry reads one opening the given part after a family comma (`Rahman, Md` → given 'Md', reported), and rules/T8 divides one glued to the next word at its full stop (`Md.Karim Uddin` → given 'Md.', decisions/T8). The Standing line drops the clause and names `sk` (#1129) and `md` (#1383) in the shipped set. Found by the 3.1 release sweep.
- 2026-11-20 #969 — DECLINED: AN UNLISTED ABBREVIATION FILLING THE PART AFTER A FULL NAME AND A COMMA IS NOT READ AS A POST-NOMINAL BY SHAPE (the issue's option (b)). Decided 2026-11-20. One word is nearly the whole population: of the roughly 3,300 Czech candidates' records whose box after the name read as a title, `DiS.` is 3,232 (cz-candidates, 170,181 records, 2026-10-30), and it is listed instead (decisions/suffix-acronym-collisions' entry of this date). The rest are a few words a vocabulary answers or leaves (`dipl. um.` 27, `Dr.` 10, `DrSc.` 12, `ArtD.` 3, `IEn.` 3). A rule of shape would reverse a reading held since 1.4.0, an unlisted abbreviation heading the part after a family comma being this rule's title (`John Smith, Insp.` → title 'Insp.'), for every unlisted word in every corpus, which the vocabulary does not need to. Recompute, on a checkout of `3ca31c2f`, before DiS was listed: over `local_corpora.py`'s cz-candidates records with the `titulza` box (after the name) filled, parse each `name` with `Parser()` and count the records whose parsed title holds a word of the box; the total near 3,300 (3,330) is every such record. `dis` is the issue's test, `re.search(r"\bdis\b", box.replace(".", "").casefold())`, 3,248 records holding it and 3,232 read as a title; `DrSc.` 12, `ArtD.` 3 and `IEn.` 3 fold alike, while `dipl. um.` 27 and `Dr.` 10 count the boxes written exactly so (folded, `dipl` 40 and `dr` 20).
8 changes: 8 additions & 0 deletions docs/design/decisions/suffix-acronym-collisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Elsewhere: since phase 2a the ambiguous marking above is derived from a word's n
- The Nigerian marks `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc`, all but `psc` repaired in lower case (`psc` being a surname, so unmasked), and the honours `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are credentials; a word spelling one after a one-word family and a comma reads as it, in capitals or Title case (`Bello, MNI`, `Gurung, Mni`), and so does one opening the given part there or ending a name — 2026-11-20 #1361.
- `bchir` is marked ambiguous by its family reading, the surname Bchir, with no case mask; `mh` and `sc` are out, their clash being with initials; `san` waits for a Nigerian English choice of language — 2026-11-20 #1361.

- The Czech and Slovak `DiS` is a credential, marked ambiguous by mul.toml's surname Dis and carrying no case mask; `DrSc` and `ArtD`, the post-nominals phase 3f wrote `default = false` for neutrality, are read by default — 2026-11-20 #969.

Open: #1053, carried over from #965 (telling the credential `FREng`, written in mixed case, from the surname `Freng`; a case reading of S6's, held in decisions/S6).

## Log
Expand Down Expand Up @@ -103,3 +105,9 @@ Open: #1053, carried over from #965 (telling the credential `FREng`, written in
- **Declined: `mh` and `sc`.** Listed, the two moved 324 local-corpus names, most of them wrong: the `Sc` of a split `M. Sc.` (94), capitals initials after a comma (FEC's `DOYLE, SC` shape) losing the given name, and paired initials inside a name (`M.H.`) losing the family. After a comma with `JP` behind them they read as the credential run already (rules/C5, #1392). Accepted with the decline: a lone trailing `, MH` or `, SC` stays the given name, and with no comma each reads as the family (`Hon WONG Kwok-kin MH JP` → family 'MH', suffix 'JP'), as 18 MH and 4 SC names of the LegCo lists are written. Neither has a name reading to mark it ambiguous by, its clash being with initials. Each carries an `excluded` entry in en.toml.
- **Deferred: `san`** (Senior Advocate of Nigeria), the given name San and es, it and fil's saint particle. As a default credential it cost 17 family names written in capitals (TSE's `ALCEU A SAN` shape) and added 143 reports; it waits for a Nigerian English choice of language, where it would be a `default = false` reading. en.toml records the exclusion; #1228 stays open for it.
- **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `snapshot.py --local SOURCE --base` on ctgov-officials (322 entries move, decisions/S12's entry, none emptying a field), govuk-people (1, a report) and fec-individuals (2); `local_agreement.py --base` on orcid-researchers (2 records fixed, 0 broken: an `, mni` and an `aus der`) and psc-individuals (1 fixed, a surname box ending `Gbm`, and 1 company name changed); the committed snapshot, the Hong Kong lines and `Jane Doe, BM, BCh, PhD`. The `mh`/`sc` and `san` figures are the triage's of the same day. Recompute: those commands with `--base <a checkout of the base>`; for the declined and deferred words, `config_diff.py diff default` against an `expr:` lexicon adding them as credentials, `--local all --match` over the words; the bearer counts are on the words (`tools/vocab/query.py --word bchir`, `tools/name_usage.py mni --boxes`).
- **2026-11-20 (#969) — `DIS` IS A CREDENTIAL, MARKED AMBIGUOUS AND UNMASKED; `DRSC` AND `ARTD` ARE READ BY DEFAULT.** Decided 2026-11-20. `Jan Novák, DiS.` read title 'DiS.' (rules/H2, the unlisted abbreviation heading the given part after a family comma), `Bc. Jan Novák, DiS.` title 'Bc. DiS.', and `Jan Novák, DiS` reversed the name; the Czech candidates' registers write the diploma after the name in 3,248 of 170,181 records (2026-10-30).
- SUPERSEDES, in part: decisions/vocabulary-model's 2026-10-30 #753, phase 3f entry's `default = false` on `drsc` and `artd`.
- **The readings.** `dis` is a credential in cs.toml and sk.toml, the diploma of both countries. Its surname reading, the Dis of ORCID's family boxes (14, five of them with a country, BR, CZ, FI, NL and US) and PatentsView's (6), stands in mul.toml, its bearers being of no one language, so a strict choice of either language still gates it: `Jan Dis` keeps the family, reported. It carries no case mask: a mask applies in every role and repaired the surname (`JAN DIS` → `Jan DiS`), the `psc` lesson of the 2026-11-20 (#1361) entry above, so a mixed-case spelling is left as written, and case repair of a name written in one case writes `DIS.` (`jan novák, dis.` → `Jan Novák, DIS.`), as `capitalized(force=True)` writes `DIS`. `drsc` (cs.toml, sk.toml) and `artd` (sk.toml), which phase 3f wrote `default = false` for neutrality, as it wrote the doctorates the 2026-11-06 #1115 entry of decisions/vocabulary-model turned on, are read by default: neither has a name reading (ORCID's boxes hold `DrSc` 5 times, the credential typed in; no Census, SSA or PatentsView bearer of either).
- **Accepted:** a `DiS` written in mixed case in the first part after a full name and a comma reports `suffix-or-name`, the gated class's report there (rules/C4), where one in capitals in a name of mixed case reads with none (rules/S6) and one past a second comma reports `comma-structure` only; with no comma the word in its own mixed case stays a name word by its writing (`Jan Novák DiS.` → family 'DiS.', reported, rules/S6), as master read it, the mixed case's reading being #1053's open question, and so it does ending the given part after a family comma (`Novák, Jan DiS.` → middle 'DiS.'); after a one-word family or nothing (`Novák, DiS.`, `, DiS.`) it is still rules/H2's title; and a surname Dis written otherwise than Dis reads as the credential: in capitals in a name of mixed case even with no word to spare, unreported where a family remains (`Jan Novák DIS` → suffix 'DIS'; `Jan DIS` → suffix 'DIS', no family, reported `given-or-family`), rules/S6's capitals reading, as `Amani BCHIR` reads in the 2026-11-20 (#1361) entry above; and in a name written in one case, or in lower case in a name of mixed case, where the count takes it with a word to spare (`PETR JAN DIS` → family 'JAN', suffix 'DIS', reported; `jan novák dis` → suffix 'dis'), its writing saying nothing (rules/S4, S6).
- **Left out:** `IEn.` (3 Czech records), a given name (US SSA 16 births since 1880, a lower bound, years under 5 unrecorded), with an `excluded` entry in cs.toml; `dipl. um.` (27), two words, the first already mul.toml's academic `dipl`; `Dr.` written after the name (10), a title.
- **Measured** 2026-11-20 against a checkout of master `3ca31c2f`: `local_agreement.py cz-candidates --base`, 3,169 records fixed, 0 broken, 79 changed (the credential now right where another field still disagrees, mostly a double surname, and `Bc. et Bc.`, which master misreads too); with `--locale cs`, 3,216 fixed, 0 broken, 17 changed; `snapshot.py --local ctgov-officials --base`, 19 entries move, every one a `DrSc` or `Dr.Sc.` read as the credential where it was a given name, a title or a `comma-structure` report; `local_agreement.py orcid-researchers --base`, 1 record fixed (a Croatian `dr.sc.` in the given box), 1 changed (an Austrian family box holding `Dr.Sc.`); psc-individuals, none; the committed snapshot, none. Recompute: those commands with `--base <a checkout of the base>`; the bearer counts with `tools/name_usage.py dis drsc artd ien --boxes`; the Czech candidates' per-word counts by decisions/H2's 2026-11-20 #969 recipe.
2 changes: 1 addition & 1 deletion docs/design/decisions/vocabulary-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ Open: [#1145](https://github.com/derek73/python-nameparser/issues/1145), the dis
- **Open: a period-joined token whose only title chunk the choice makes possibly given reads as a name word, in both directions.** `_vocab.period_joined_vocab` makes a token a title where ANY chunk is in `titles`, and under `ne` `श्री` has moved to `titles_ambiguous`. That costs `सु.श्री.` (सुश्री, Ms., written with its periods), title under the default and given under `ne`, 2 nepal-candidates names; and it fixes a given name glued behind the word, `श्री.राम थापा`, title `श्री.राम` under the default and given `श्री.राम` under `ne`. Whether a possibly-given chunk counts there is open; a fix would move the default for every word of `TITLES_AMBIGUOUS`, and its grid holds both `सु.श्री.` and `श्री.X`.
- **Recompute:** the three commands above from a checkout of this change; the CLDR record with `cldr_agreement.py`; the word counts with `tools/name_usage.py guru गुरु श्री`.
- **2026-10-30 #754, sub-phase 4g — THE COMPOUND GIVEN NAME IS A RULE KIND: `Policy.two_given_names`, rules/O7, OFF BY DEFAULT AND A `[rules]` KEY; NO DEFAULT PARSE MOVES.** Carries out item 7 of the 2026-10-28 #754 output-model entry and the 4g row of its item 9. The rule kind is built as the 4f entry's item 1 says a new one is: a `Policy` field with `ADDED_IN` (`3.0.0`, so a 2.8 `Policy` pickle loads with it off, tests/v2/data/policy_v28.pickle), a `flag` row in `tools/vocab/build.py`'s `RULE_KEYS` with its default `false` refused, a row in `_locale._RULE_VALUES`, and a mechanisms.md entry, DECLARED-SPAN, which it shares with rules/O6's switch, whose mirror it is. No file turns it on: whether `es` and `pt` do is 3g's. What the rule reads, its precedence against O6 and O3, and the measurements are decisions/O7's 2026-10-30 entry; the `Maria do Carmo Silva` shape the RFC's table names stays unread, the particle chain running to the end of the name, and is Open there. Item 6 of the 4f entry, deriving `DEVIATES` from the rules, stays open: this rule has no surface in the name for a pack to declare.
- **2026-10-30 #753, phase 3f (its doctorates' `default = false` superseded by the 2026-11-06 #1115, the pack titles entry, which reads them by default, so the default reads `Jan Novák, MUDr` as the pack does) — THE CZECH, SLOVAK, SLOVENIAN AND CROATIAN PACKS: `locales.CS`, `SK`, `SL` AND `HR`, ONE `Locale` PER LANGUAGE, EACH, LIKE `locales.NE`, A CHOICE OF ITS ONE TAG; `pan` AND `roz` BECOME READINGS OFF BY DEFAULT; THE DEFAULT DOES NOT MOVE.** Carries out 3f of item 11 of the 2026-10-27 #753 entry.
- **2026-10-30 #753, phase 3f (its doctorates' `default = false` superseded by the 2026-11-06 #1115, the pack titles entry, which reads them by default, so the default reads `Jan Novák, MUDr` as the pack does; the post-nominals `DrSc` and `ArtD` read by default since decisions/suffix-acronym-collisions' 2026-11-20 #969 entry) — THE CZECH, SLOVAK, SLOVENIAN AND CROATIAN PACKS: `locales.CS`, `SK`, `SL` AND `HR`, ONE `Locale` PER LANGUAGE, EACH, LIKE `locales.NE`, A CHOICE OF ITS ONE TAG; `pan` AND `roz` BECOME READINGS OFF BY DEFAULT; THE DEFAULT DOES NOT MOVE.** Carries out 3f of item 11 of the 2026-10-27 #753 entry.
- **One pack per language,** as the RFC's API section already had it ("each language is a pack of its own"), and for three reasons measured here: the files hold different words (sl and hr only the generations, sk `ArtD.`, cs `pan` and `roz`), so a shared pack would turn on Czech `pan` and `roz` for a Slovenian caller; the choice is a set, so a caller with data in two of them passes both (`parser_for(locales.CS, locales.SK)`); and a pack is then nothing but its tag, `Locale(code="cs", lexicon=Lexicon.empty(), languages=frozenset({"cs"}))`, auditable as its file. Each module ships no `DEVIATES`, as phase 3d's contract has it for a pack that is nothing but a choice: its deviations are `changed_words` of its choice, and the contract test now also refuses a choice pack whose choice changes no word (decisions/deviates-registry's 2026-10-30 phase 3f entry).
- **The readings, all written `default = false`, so `_compiled.py` is unchanged.** 3c's generations `ml` and `st` in all four. In cs and sk, the academic titles written before the name as `academic` readings with their case masks (`mudr`, `mddr`, `mvdr`, `judr`, `phdr`, `rndr`, `paeddr`, `pharmdr`, `thdr`, `mgr`; cs also `mga` and `bca`) and the degrees written after it as `credential` readings (`drsc`; sk also `artd`): #848's open question 1, whether `Mgr.`, `MUDr.` and `PhDr.` follow `Ing.` to the suffix after a comma, is answered for the pack by Czech usage, title, since they stand before the name. `mgr` changes no compiled set, en and fr reading it as Monsignor already; under the choice its kind is `academic`. cs's and pl's `pan` exclusions become `salutation` readings, and cs's `roz` exclusion a `birth_marker` reading, each keeping its collision in its note. So `Jan Novák, MUDr` reads title `MUDr`, given `Jan` under `locales.CS` where the default reverses it (given `MUDr`, family `Jan Novák`), `Jan Novák MUDr.` reads the title at the end (rules/H5), `Jan Novák, DrSc` suffix `DrSc`, `Jana Nováková roz. Svobodová` maiden `Svobodová`, `Janez Novak st.` under `locales.SL` suffix `st.`, reported suffix-or-name, and `capitalized()` writes `MUDr.` for `mudr.`. Every reading was swept over the four comma shapes, the three orders, dotted, bare and one-case spellings and a family comma behind a `Freiherr` head; tests/v2/test_locales.py's `test_the_west_and_south_slavic_packs_read_what_the_default_refuses` pins a row of each, default and pack side by side.
- **Left out, with the reason:** `bc` (bakalář) is an exclusion, measured: under a Czech choice it moved 23 of ctgov-officials' 536,981 officials, one a Czech `Bc` and the rest the US nursing credential Board Certified or initials (`Lora L. Beebe, PhD, PMHNP, BC` read title `BC`; `ACNP-BC` recased `ACNP-Bc`), and `Bc.` with its period is a title at the head by its shape anyway. `ing` stays mul.toml's ambiguous credential: an `academic` reading beside its `given` reading would be a title only inside a title phrase (rules/H9), moving nothing but `Ing` in a phrase, and its dotted spelling is a title by shape. `doc` (docent) is an English nickname (US SSA 1,391 given-name births, nam_dict band 4), recorded as no reading of any file; an `academic` reading would need that `given` reading beside it, which makes it a title only inside a title phrase (rules/H9), so it would move nothing a pack wants, and the dotted `doc.` is a title by shape already. Slovak `rod.` and `rodená`, the masculine `rozený`, the Slovene and Croatian academic abbreviations (`dr. sc.`, `mag.`, `univ. dipl. inž.`) and Slovak `pán` and `pani` are unvetted, not refused.
Expand Down
11 changes: 5 additions & 6 deletions docs/languages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ What the default reads and what waits for a pack
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The default reads the doctorates before the name (``MUDr.``,
``JUDr.``, ``PhDr.``, ``RNDr.`` and the rest), and ``Mgr.``, which it
lists as Monsignor. It cannot read the other words, each of which
``JUDr.``, ``PhDr.``, ``RNDr.`` and the rest), ``Mgr.``, which it
lists as Monsignor, and the degrees after it, ``DiS.``, ``DrSc.`` and
``ArtD.``. It cannot read the other words, each of which
another reading claims:

- ``ml.`` is also a pair of initials.
Expand All @@ -74,13 +75,11 @@ So they wait for a pack:
- Turns on
* - ``locales.CS``
- ``ml.``, ``st.``; the titles ``MgA.``, ``BcA.`` and ``mjr.``, and
``Mgr.`` read as the degree; ``DrSc.``
after the name; ``Pan`` (Mr.); ``roz.``, which routes a maiden
``Mgr.`` read as the degree; ``Pan`` (Mr.); ``roz.``, which routes a maiden
name as ``rozená`` does; two family names
(``two_family_names``)
* - ``locales.SK``
- ``ml.``, ``st.``; ``Mgr.`` read as the degree;
``ArtD.`` and ``DrSc.`` after the name; two family names
- ``ml.``, ``st.``; ``Mgr.`` read as the degree; two family names
(``two_family_names``)
* - ``locales.SL``, ``locales.HR``
- ``ml.``, ``st.``
Expand Down
Loading