Skip to content

Count a family part's particles out of its numeral count (#1080) - #1091

Merged
derek73 merged 4 commits into
masterfrom
fix/issue-1080-particle-before-numeral
Nov 5, 2026
Merged

derek73 merged 4 commits into
masterfrom
fix/issue-1080-particle-before-numeral

Conversation

@derek73

@derek73 derek73 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Closes #1080

What moved

Before a family comma, a one-letter roman numeral read as the generation from 2.7.0 on wherever a particle stood in the part, the particle counted as a name word to spare:

Input 1.4.0 – 2.6.0 2.7.0 – 2.8.2 this PR
SMITH VD V, JOHN family SMITH VD V¹ family SMITH VD, suffix V family SMITH VD V
Smith van der V, John family Smith van der V family Smith van der, suffix V family Smith van der V
van der V, John family van der V family van der, suffix V family van der V
de Mesnil V, Jean family de Mesnil V family de Mesnil, suffix V family de Mesnil V
John van der V, M.J. family John van der V family John van der, suffix V family John van der V

¹ 2.2.0 and 2.3.0 read family SMITH V, suffix VD (#573).

Why

rules/C1's numeral site in the family part (_assign._family_part_numeral, added by #886) asks rules/S10's (the trailing roman numeral) words-to-spare count: a one-letter numeral needs two name words in front of it. It counted pieces, and a particle no chain has joined to a name word is a piece of its own there. _names_before now counts only the pieces that are not wholly particles: the comma has named the part a surname, where a particle heads the name word behind it, so it reads as part of that word, as rules/C3 (counting the words before the comma) counts a particle run.

Rules amended

  • S10 (the trailing roman numeral), family-comma Precedence bullet: states the count, with Smith van der V, de Mesnil V and the Smith van der Berg V boundary as examples. The clause reads the signal S10 already reads there (its words-to-spare count), so it is not a new rule.
  • C1 (the suffix comma decision): its sentence that a numeral ending the family part "is read as the comma-less name reads it" gains the exception, with John van der V, M.J.. The comma-less name has a given name a particle may follow; a family part has none.
  • P9 (a particle that is also a suffix word, beside a family comma): the deviates: #1080 markers are gone, the clause is scoped to a letter ending the part, and its mixed-case example (Smith vd v, John) is now fenced.
  • Rule sizes re-recorded (rules_budget.json): C1 454 → 476 words, P9 405 → 420, S10 665 → 721, each for the clause above.

Boundaries (case rows)

  • Smith van der Berg V, John keeps suffix V: a joined chain is one name word, so two stand in front, as in Smith Jones V, John.
  • Smith Jones van V, John and de Mesnil Jones V, Jean keep suffix V.
  • Numerals of two or more letters, the comma-less John van V, and the part before a suffix comma (Smith van der V, Jr.) do not move.
  • Not decided: with a suffix word behind the letter, P9's first clause reads it as a name word (Mary Smith vd V Jr., John gives family Mary Smith vd V), where the part without the particle reads it as the numeral. It reads the same on master and is recorded in decisions/P9.

Measured

  • Grid of 34,992 parses (recipe in decisions/P9): 4,398 move, 1,466 per order. Every one is a one-letter numeral moving from the suffix to the family with one fewer suffix-or-name.
  • Committed corpora: only SMITH VD V, JOHN and smith vd v, john move, plus five rule examples new to the rules corpus.
  • Local corpora against a 401bf62 checkout: ctgov-officials and tse-donors do not move. fec-individuals moves two: DU HART V, JOHN (suffix V → family DU HART V) and VAN METER V, ISAAC C IV (generation V, IV → family VAN METER V, generation IV). In FEC's FAMILY SUFFIX, GIVEN writing both Vs are most likely generations. It is the cost S10's count already takes for a one-word surname (SMITH V, JOHN reads family SMITH V on master), and it is 1.4.0's through 2.6.0's reading. Decided: accepted (decisions/P9's Why does "SMITH VD V, JOHN" lose the V from the family name when "SMITH V, JOHN" keeps it? #1080 entry). The first draft, which left out only particles right in front of the numeral, moved neither.

Checks

uv run pytest, uv run pytest -n0 -m serial, uv run mypy and uv run ruff check pass. Reviewed by the design-docs, code, test and comment reviewers; the second commit addresses their findings. A second round (code and design docs) reviewed the fix commits: it found no code defect, and the last commit files the count under decisions/S10, adds head notes to the two entries that restated the old count (decisions/C1 #774, vocabulary-model 2f), and corrects three release ranges.

Not done here: the connective twin Smith y V, John (suffix V, family Smith y V in 1.4.0 and 2.6.0), which the test review found and which is a separate rule, now #1093.

🤖 Generated with Claude Code

rules/C1's numeral site in the family part counted the pieces in front
of a one-letter numeral, and an unjoined particle is a piece of its own
there, so `SMITH VD V, JOHN` read family 'SMITH VD', suffix 'V', and
`van der V, John` family 'van der', suffix 'V'. A run of pieces made
wholly of particles right in front of the numeral is now left out of
the count, as P9 (a particle that is also a suffix word, beside a
family comma) already said: the letter reads as the part without the
particle reads it. 1.4.0 through 2.6.0 read these as family; 2.7.0
through 2.8.2 read the suffix (#886).

- P9's two deviates: #1080 markers removed
- decisions/P9 entry with the grid measurement and local corpora
- case rows for the fix and two boundaries (a joined particle surname,
  a particle behind two name words)
- nameparser/AGENTS.md: a count inside a part follows C3 too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added the bug label Nov 5, 2026
@derek73 derek73 self-assigned this Nov 5, 2026
Address the review of the first fix:

- _names_before counts the pieces in front of the numeral that are not
  wholly particles, wherever they stand, so a particle opening the part
  is no word to spare either ('de Mesnil V, Jean', 'van Smith van V,
  John' keep the V in the family, as 1.4.0 through 2.6.0 read them)
- S10 states the count in its family-comma bullet, with examples, and
  C1's sentence that the family part reads its numeral as the
  comma-less name does gains its exception ('John van der V, M.J.')
- P9's clause is scoped to a letter ending the part, and its mixed-case
  example is fenced; the 'vd V Jr.' shape is recorded as not decided
- decisions/P9: corrected release history (2.2.0 and 2.3.0 read
  'SMITH VD V' otherwise), the grid re-measured (4,398 of 34,992 move,
  1,466 per order), and two FEC names that now move recorded
- case rows for a title head, a third comma part, the I spelling, a
  leading particle and paired initials; release-log lead says "family
  comma"; rule sizes, rules corpus and snapshot re-recorded

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 changed the title Count a lone letter behind a particle run without the run (#1080) Count a family part's particles out of its numeral count (#1080) Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Address the second review of the fix commits:

- decisions/S10 gains the Standing line and a Log entry for the count,
  which is S10's; the full record stays in decisions/P9
- head notes on decisions/C1's #774 entry and vocabulary-model's 2f
  sites bullet, which restate the count over every piece
- release ranges: 'smith vd v, john' ('vd, v' through 2.2.0, 'vd v' in
  2.3.0 and 2.4.0), 'Smith van der V, Jr.' (2.2.0 on), and the title
  row's note (2.5.0 and 2.6.0 read as here)
- the release-log bullet says the de Mesnil reading moved, and names
  the generation it reads as part of a particle surname

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 4109b02 into master Nov 5, 2026
13 checks passed
@derek73
derek73 deleted the fix/issue-1080-particle-before-numeral branch November 5, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why does "SMITH VD V, JOHN" lose the V from the family name when "SMITH V, JOHN" keeps it?

1 participant