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
4 changes: 2 additions & 2 deletions AGENTS.md

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions docs/customize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,13 @@ The full reading of a bare marked acronym, in order:
reads as the given name is ``"Smith, Ba"`` (one word, and Title-case
has no credential lean) and ``"smith, ba"`` (one word, one case, no
lean at all).
- **In brackets**, ``"John Smith (BA)"`` falls through to nickname
parsing.
- **In brackets after the name**, the capitals in a mixed-case name
settle it as the credential too, and so does a period inside the word:
``"John Smith (BA)"`` and ``"John Smith (B.A)"`` give suffix ``BA`` and
``B.A``. Any other spelling there, and any spelling inside the name,
falls through to nickname parsing (``"John Smith (Ba)"``,
``"Jeffrey (JD) Bricken"``), reported as a ``suffix-or-nickname``
ambiguity.

Generation words that are also surnames
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions docs/design/decisions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Entry conventions:
- [S10 — the trailing roman numeral](S10-trailing-roman-numeral.md)
- [S12 — a credential split across a space](S12-credential-split-across-a-space.md)
- [S11 — a suffix word that is also a name](S11-suffix-word-that-is-also-a-name.md)
- [S13 — a bracketed member settled by its writing](S13-bracketed-member-settled-by-its-writing.md)

## Nicknames & quoted names (N)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- The rule says what the escape does: quotes escape as brackets do, and a clause of two or more words is not suffix-shaped unless an ASCII period ends it, so `(PhD MBA)` keeps its nickname reading with nothing reported, as 1.4.0 read it — 2026-10-21 #807.

Elsewhere: an ambiguous member alone in the brackets staying a nickname, reported, is decided under decisions/suffix-acronym-collisions (its Standing line ending 2026-09-25 #540; 2026-10-21) and decisions/ma-do's 2026-07-17 entry.
Elsewhere: an ambiguous member alone in the brackets staying a nickname, reported, is decided under decisions/suffix-acronym-collisions (its Standing line ending 2026-09-25 #540; 2026-10-21) and decisions/ma-do's 2026-07-17 entry; a member after the name whose writing settles it reading as the suffix is decisions/S13 (2026-10-26 #810).

## Log

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# S13 — a bracketed member settled by its writing

## Standing

- A member of the ambiguous class alone in brackets or quotes after the name, its writing settling it as the credential, is the suffix, read in one pass, and reports nothing (`John Smith (MA)`, `John Smith (M.A)`, `Smith, John (MA)` → suffix); any other member stays the nickname S1 reads and reports `suffix-or-nickname`, a dotted member inside the name included (`John Smith (Ed)`, `John Smith (Ma)`, `JOHN SMITH (MA)`, `Jean (M.A) Smith`) — 2026-10-26 #810.
- The writing that settles it is read by the rules that read writing: a period inside the word, S3's evidence, whatever case the name is in, and capitals in a name of mixed case, S6's, the case being that of the name's own words and never the clause's, so `john smith (MA)` keeps the nickname where bare `john smith MA` reads suffix. S13's own signal is the position alone — 2026-10-26 #810.
- Only a clause after the name is settled, behind its last name word: one in a name with no word of its own keeps the nickname (`Dr. (MA)`, `(M.A)`, where the review of the one-pass commit found both settled), and one with a name word after it keeps the nickname however it is written (`Jeffrey (JD) Bricken`, `Jean 'JD' Smith`, `Smith (MA), John`), while a suffix, a title or a maiden clause after it does not count, however it is written (`John Smith (MA), PhD`, `John Smith (MA) Ph. D.`, `John Smith (MA) Dr.`), asked of the roles the parse read rather than of the following words' tags — 2026-10-26 #810.
- Where the rest of the name then reads otherwise than beside a bracketed unambiguous credential in the same place, the member's twin, the difference is an accepted cost, recorded in rules/S13's Accepted bullets and counted by tests/v2/test_parser.py's census (`Jack (MA)` → family 'Jack', where `Jack (PhD)` reads given 'Jack') — 2026-10-26 #810.

## Log

- **2026-10-26 #810 (Derek, 2026-10-23; the single signal and the one pass Derek, 2026-10-26) — A BRACKETED MEMBER OF THE AMBIGUOUS CLASS AFTER THE NAME, SETTLED BY ITS WRITING, IS THE SUFFIX, READ IN ONE PASS.** Carries out item 16 of decisions/vocabulary-model's 2026-10-23 #752 entry, as phase 2l of #752. SUPERSEDES: in decisions/ma-do, the 2026-07-17 entry's side effect, in part (a parenthesized `(MA)` or `(DO)` no longer escaping to suffix), for a member after the name whose writing settles it. #810 asked whether `John Smith (M.A)` should read as `John Smith M.A` does, and found `(M.A)`, `"M.A"` and `(MA)` all reading as a nickname where 1.4.0 read the bracketed ones as a suffix; 2.0.0 through 2.6.0 read each as a nickname (measured 2026-10-26 on the wheels, `John Smith (MA)`, `John Smith (M.A)`, `Smith, John (MA)`). The escape had refused every member since `ma` joined the class (decisions/ma-do, 2026-07-17), and #796's 33 new members widened its reach.
- **Why the writing, and why after the name.** After the name, brackets hold either a credential or the name the person goes by, and the count of words cannot tell the two apart there, the name being whole without the clause. The writing can: credentials are written in capitals and with their periods, names are not, which is S6's and S3's ground. Inside the name the same member let out of the brackets would read as a middle name, where the brackets more likely hold the name the person goes by: a spike in the design round (2026-10-23, against 638685b4; a dated snapshot, the spike's switch being in no tree) that escaped every member written in capitals or with an interior period moved `JD` from the nickname to the middle name in two committed rows, `Jean 'JD' Smith` and `JEFFREY (JD) BRICKEN`. So a clause with a name word after it is not settled.
- **Why the name's case, not the clause's.** The same spike asked the bracketed word's own case and moved 6 FEC names, every one wrong: the corpus is written wholly in capitals, so capitals there settle nothing, and `(ED)` in such a name is the nickname. Asking the case of the name's own words, the fact S6 records for every other site (`settled_by_case`), moves none of them. The clause's own words are no name of their own, so `john smith (MA)` asks the case of `john smith` and keeps the nickname, where bare `john smith MA` reads suffix; the two differ by construction, the bare word being one of the name's own words.
- **Why the suffix, not the bare reading.** S1's escape lets suffix-shaped content read as if written bare. A settled member cannot, because since #872 a word of two dotted single letters in a script with capitals reads bare as paired initials (decisions/S3), so `John Smith (M.A)` let out of its brackets would read family 'M.A'. The clause is read as the suffix directly, the brackets having already set it apart from the name's words. The decision is made first in post_rules, where every word's role is read, and the `suffix-or-nickname` report moved there with it, from classify, so that it is raised where the fork is decided. Frames counted with `sys.setprofile`, py3.11, 2026-10-26, against master: `Smith, John` 158 and `John Smith` 149 unchanged; `John Smith (MA)` 214 → 210, `Jack (MA)` 174 → 171; a name holding a clause it does not settle pays 2 to 5 (`John (Bob) Smith` 204 → 206, `John Smith (Ed)` 214 → 219).
- **Declined: the twin reading, folding the pipeline again (Derek, 2026-10-26, "the one pass version").** A draft of this PR read a settled member exactly as its twin, a bracketed unambiguous credential in the same place, reads, fields and reports alike: post_rules recorded the settled clauses and the stages folded again from the start, extract escaping each clause and classify giving its word the credential's tag, until no new clause settled (a settled word joining the name's own words can make a one-case name mixed and settle a second clause). Its review rounds found three more places to bring in line with the twin, the part past a second comma among them. It cost a whole parse per settled name (`John Smith (MA)` 214 → 416 frames) and machinery in four stages for a shape that moves 3 real names in the corpora measured here (ctgov-officials'; 35 names hold it, ctgov's 29 and FEC's 6). In one pass the rest of the name is read as beside a nickname, and where that differs from the twin the difference is an accepted cost, recorded in rules/S13's Accepted bullets: a lone name word stays N3's family name (`Jack (MA)`; `Jack (PhD)` reads given 'Jack', reported); a maiden clause after the member stays the maiden name, where the twin's credential run takes it (`John Smith (MA) née Jones`); the case is asked once, so a capitals member settled only once another settled word made the name mixed stays the nickname (`JOHN SMITH (m.a) (MA)`, where the twin `JOHN SMITH (mba) (MA)` reads suffix 'mba MA'); and a part past a second comma is weighed without the member (`Smith, John, X.Y.Z. (MA)` reports nothing where `(MBA)` draws `comma-structure`). tests/v2/test_parser.py's `test_where_a_bracketed_member_reads_otherwise_than_its_twin` records the census of such differences over a grid of comma shapes, heads and the three orders (396 of 1,080 readings on 2026-10-26, by head), so a change that moves the count shows up; the folded draft differed from the twin in none of the settled rows.
- **Why post_rules, found by the code review.** The first draft decided in group and called a word after the clause a name word unless it carried the suffix tag. A suffix the tag does not mark then kept the clause a nickname while its listed twin let it through: `John Smith (MA) VI` and `(MA) Ph. D.` against `(MA) III` and `(MA) PhD`, the same for a member read by its capitals (`(MA) DO`), an unlisted dotted credential (`X.Y.Z.`) and `fils`, and a title after the clause (`John Smith (MA) Dr.`, `Doe, Jane (MA) Mrs`). Asking the roles the parse has read answers for every spelling at once. The same draft scanned the whole name once per clause, quadratic in the number of bracketed members (`"(M.A) " * n` 13.7× for 4× the input, against 3.3× after the fix, py3.11, 2026-10-26); the pass now maps clauses to tokens once, and test_benchmark.py's `bracket_members` row guards it, failing on the first draft twice in two runs.
- **Recorded as a rule of its own, reading one signal (Derek, 2026-10-26).** The position it reads (after the name) is evidence S1's shape signal does not read (docs/design/AGENTS.md, axis 12), so it is not an S1 clause. What settles the member is the writing, and the writing is other rules' evidence, so S13 cites them rather than reading it itself: the period inside the word is S3's, capitals in a mixed-case name S6's, and the escape from the nickname S1's; its Signal line is the position, a hub of S1, S3 and S6. An earlier draft named the period as a second signal of S13's own, a split candidate at birth. S3 reads two dotted letters bare as initials, and S13's Precedence bullet states that the brackets after the name outrank that reading. The dotted arm has no real-name population in any corpus measured here (none of ctgov-officials' 29 bracketed members, nor FEC's 6, is dotted), so it rests on Derek's decision of 2026-10-23 and on 1.4.0's reading of `John Smith (M.A)` as suffix, not on a measurement. A dotted member left the nickname inside the name is reported, as a tagged one is: the report had keyed on the class tag, which a dotted word in a clause does not carry, while S1's bullet, widened to every member, said it was reported (`Jean (M.A) Smith` reported nothing on master and on the first draft). S1's member bullet keeps the nickname reading for the members this rule does not settle, and its Precedence names this rule.
- **Declined: escaping every member.** A spike escaping every bracketed member to its bare reading (2026-10-23, against 638685b4, a dated snapshot like the one above) moved 27 ctgov-officials names and took `Ed` out of the nickname 17 times, `Ed` being the nickname of Edward far more often than a credential written in Title case.
- **Left as found by the second review**: one post rule can still put a name word behind a settled clause, P6's attachment after a comma with nothing before it, which runs after the pass that settles (`, Jones (MA) vd`); the shape has no name before its comma and nothing in the corpora writes it.
- **Kept from the twin draft's reviews.** A clause is the member alone only where its whole text is the member, as extract's escape reads a clause, so a character tokenize drops beside it (an emoji, a zero-width space, a nakaguro) leaves it the nickname, as its twin `(PhD 😀)` is no escape (`John Smith (MA 😀)`); a first draft counted tokens and settled it. A word read as a name after the clause keeps the member a nickname, as it would sit inside the name (`John Smith (MA) Ma`, family 'Ma'), the position being read on the nickname reading. The draft's comma-structure fix is not needed in one pass: the part past a second comma is tested while the clause is still a nickname, so `Smith, John, Jr. (M.A)` reports nothing, as its twin does.
- **Accepted:** the twin differences the declined bullet above lists, in rules/S13's Accepted bullets.
- **Measured** (2026-10-26, against master 12384fae with `--base` on a clean checkout, and again on the one-pass tree with a name word required before the clause, 482691a6, against master 13539131, #897, with the same moves): the committed snapshot moves 3 names, each a member read as the suffix in place of the nickname, its `suffix-or-nickname` report gone (`John Smith (MA)`, `Andrew Perkins (JD)`, `John Smith PhD (MA)` → suffix 'PhD MA'); every CLDR, GND, Wikidata and conventions agreement record matches, the locale views included. Of the local corpora, ctgov-officials moves 3 of the 29 names holding one member alone in brackets or quotes (the other 26: 2 already the suffix by a final period, `Ed.`; 23 in Title case, every one `Ed`, 3 of them inside the name and 1 in a one-case name; and 1 in lower case), each a capitals member in a mixed-case name after a credential behind a comma (shapes `Aa A Aa, AA (AA)`, `Aa Aa, AaAaAa (AA)`, `Aa Aa, Aa.AA(AA)`), read suffix, the credential it is. fec-individuals holds 6 such names, all in one-case names, and none moves; tse-donors and ukec-individuals hold none and match; psc-individuals holds none, and its agreement record matches.
- **Recompute:** `uv run python tools/differential/snapshot.py` and `cldr_agreement.py` from this tree, `snapshot.py --local <source> --base <master checkout>` for ctgov-officials, fec-individuals, tse-donors and ukec-individuals, and `local_agreement.py psc-individuals --base <master checkout>`; the population is the names in each corpus holding a delimited clause of one word whose period-free fold is in `Lexicon.default().suffix_acronyms_ambiguous`, by delimiter pair, position, case and spelling.
4 changes: 3 additions & 1 deletion docs/design/decisions/ma-do.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@

Elsewhere: the rest of the case reading — Title-case `Ma` and `Do` leaning surname, an all-lower member or a one-case name taking the positional count (`ANH DO` → family 'DO', `JOHN SMITH MA` → suffix) — is decisions/S6's 2026-09-14 #289 + #516 entry and decisions/S4's 2026-09-15 (spec review) entry, and two shapes stand outside the case reading altogether: a particle run in front takes `do` whatever its case (`Anh van DO` → family 'van DO', reporting nothing; rules/P2, decisions/S5's 2026-09-18 (Derek), #531 — CAPITALS DECIDE FOR `do` entry), and an unambiguous credential in front of a member speaks for it (`John Smith PhD Ma` → suffix 'PhD Ma'; decisions/S7's 2026-09-27 (Derek), #544 — A CREDENTIAL RUN KEEPS ITS AMBIGUOUS MEMBERS entry); the count that goes first at the first slot after a comma, a suffix comma included (`Smith, MA` → suffix, `Smith, Ma` → given, `John Smith, Ma` → suffix), is decisions/S6's 2026-09-14 (Derek) and 2026-10-20 (Derek), #761 entries; the pairing that gives `do` its capitals-only credential reading after a family comma, and its accepted cost, is decisions/S5's 2026-09-18 (Derek), #531 — CAPITALS DECIDE FOR `do` entry; the escape that reads a bracketed member as a nickname is decisions/suffix-acronym-collisions' S1 line; the periods gate is rules/S3's since 2026-10-19; whether a word earns the ambiguous marking is decisions/vocabulary-collisions' C-i and decisions/suffix-acronym-collisions', with `do`'s departure from TITLES recorded in the former and further credentials marked ambiguous in the latter (2026-10-21 #796).

Elsewhere: after the name, a member whose writing settles it is the suffix, not the nickname (`John Smith (MA)`, `John Smith (M.A)`; `JOHN SMITH (MA)` and `John Smith (Ma)` keep the nickname) — decisions/S13's 2026-10-26 #810 entry, which supersedes the line above in part.

Open: #792 (S1 and S8: whether a bracketed generation ends the credential run, `W. Russell (Jr.) Withers`), the neighbour of the parenthesized line above, which it does not move: `John Smith (MA) Withers` reads nickname 'MA', family 'Withers'.

## Log

- 2026-07-17 (M12, Derek-approved) (its `Jack Ma` sentence superseded in part by #289 below, for the all-caps spelling) — ma and do joined the ambiguous acronym set because both are common surnames; the two-word "Jack Ma" is kept intact by S2's words-to-spare guard, while the periods gate governs the dotted spellings ("M.A." counts unambiguously). Documented side effect: parenthesized bare
- 2026-07-17 (M12, Derek-approved) (its `Jack Ma` sentence superseded in part by #289 below, for the all-caps spelling; its parenthesized side effect superseded in part by decisions/S13's 2026-10-26 #810 entry, for a member after the name whose writing settles it) — ma and do joined the ambiguous acronym set because both are common surnames; the two-word "Jack Ma" is kept intact by S2's words-to-spare guard, while the periods gate governs the dotted spellings ("M.A." counts unambiguously). Documented side effect: parenthesized bare
"(MA)"/"(DO)" no longer escape to suffix as in 1.x.
- 2026-09-15 #289 — AMENDS the sentence above for one spelling and leaves it standing for the other. "The two-word 'Jack Ma' is kept intact by S2's words-to-spare guard" is still true of `Jack Ma`, and false of `Jack MA`: an all-caps member of the ambiguous set inside a mixed-case name is now read as a credential with nothing to spare, so `Jack MA` gives given 'Jack', suffix 'MA' — v1's reading was last 'MA', so this is a deliberate parity break and not a restoration. The periods gate is untouched and still governs the dotted spellings. The two ledger comments that quote this sentence carry the same amendment. See decisions/S6.
- 2026-09-18 #531 — AND `do` IS NOW SPELLING-DEPENDENT AFTER A FAMILY COMMA, which neither sentence above anticipated: it is the one member of this set that is also particle vocabulary, so `Doe, John DO` reads suffix `DO` (capitals, mixed-case name) while every other spelling attaches to the family under rules/P6. The pairing and its accepted cost are in decisions/S5's 2026-09-18 `do` bullet.
Expand Down
Loading
Loading