Repository navigation
Fix a lone numeral behind a particle before a family comma - #1086
Omair-Asdaq wants to merge 3 commits into
Conversation
…ek73#1080) The family part's numeral predicate was handed the piece count, so the particle in "SMITH VD V, JOHN" was a word to spare and the lone V read as a suffix. Count the name words in front of the numeral instead, as the same part without the particle reads it.
The count drops every particle, not only the word that is suffix vocabulary too, so record a plain particle and a run of two as well: a mutant that subtracts one particle, or only the dual-vocabulary word, would pass the VD row alone. Correct the predicate's docstring, which still called the count a count of pieces. Refs derek73#1080
|
Thank you for this. The analysis is right, the bisect to #886 matches what we found, and calling out This is fixed on master by #1091 (merged as 4109b02), which was in progress when this PR was opened, so I'm closing this one as a duplicate. The two fixes differ in two shapes, both found in review of #1091:
#1091 also amends rules/S10 and rules/C1, since the count is S10's and C1's sentence about the comma-less reading needed an exception. decisions/P9 and decisions/S10 record the release history and the cost. One more thing, about how to contribute here. CONTRIBUTING.md was updated today (#1092) and now opens with "Ask before you open a pull request": please open an issue, or comment on an existing one, and wait for agreement before starting work. Every issue is assigned to the maintainer and most are already in progress, as #1080 was, so an unrequested PR usually duplicates work. Changes here also move rules, design records and a snapshot of real names that aren't in the repository. Working with an AI agent is fine, and the guide asks you to say so in a |
|
AH ok no problem i will keep that in mind from now on |
Problem
rules/P9 says a lone letter behind a particle before a family comma reads as it does in the same part without the particle, so
SMITH VD V, JOHNshould read asSMITH V, JOHNdoes. Since 2.7.0 it does not:The same holds for
SMITH VAN V, JOHNandSmith van der V, John. It came from 1f0b07c (#886), which added the family-part numeral reading and handed_family_part_numeralthe piece countk - lead: the particle counted as one of the name words rules/S10 requires in front of a one-letter numeral. 2.6.0 read familySMITH VD V, and no decisions entry (P9, S10, C3, P2) records or accepts the move. #1080 has the bisect and the table.Change
nameparser/_pipeline/_assign.py: the family-part numeral is now given the count of the name words in front of it, leaving out particle pieces, instead of the piece count. One call site, and_family_part_numeralhas one caller.The same diff carries the documents and tests AGENTS.md asks for: the two
deviates: #1080markers are gone from P9's fenced examples (so they now assert the rule), a release-log bullet is added under 3.0.0's Behavior Changes, three case rows pin thevd, plain-particle and particle-run readings, and the differential snapshot records the two corpus names that move.Test evidence
tests/v2/test_rules_doc.py::test_example[P9-1]and[P9-2]: 2 failed on the baseline expression, 1954 passed).vd,mc) fails the plain-particle and run rows (2 failed), so the rows are not one-member duplicates.5138879b): the merged tree is36 failed, 29578 passed, 7 skipped, 3 xfailed, 72 errors; master itself is36 failed, 29546 passed, 8 skipped, 3 xfailed, 72 errors. The failing and erroring test names are identical in both directions. (The one extra master skip is a test that skips outside a git checkout, which the archive copy used for the baseline is.) Those failures are this machine's cp1252 fixture decoding,\-vs-/anywhere the suite reads a path, and the network-only local-corpora tests, not the parser.ruff checkandmypyare clean.Boundary shapes
Unchanged, executed before and after:
SMITH VD, JOHNsuffixVD;SMITH VD JR, JOHNsuffixVD JR;SMITH VD MA, JOHNfamilySMITH VD MA;SMITH VD VI, JOHNsuffixVI;SMITH V, JOHNfamilySMITH V;JOHN SMITH VD V, ADfamilyJOHN SMITH VD, suffixV;DOE, JANE PHD VD MAsuffixPHD VD MA;Smith vd v, John(lowercase letter in a mixed-case name) familySmith, suffixvd v; the comma-less path and the part after a comma are untouched. Re-recording the differential snapshot moves 2 of 6,938 corpus readings, both of them the two P9 examples.Known limitations
van der Berg V, Johnnow gives familyvan der Berg Vwhere it gave familyvan der Berg, suffixV. P9's "as the same part without the particle" (Berg V, Johngives familyBerg V) and C3's one-word particle run both require it, but it is a real reading change for Dutch and Spanish names, so it is called out here rather than buried: no committed case row or corpus name covered that shape before.Fixes #1080.