Repository navigation
Gate generation readings by kind: fils, the Brazilian agnomens, default = false (#752, phase 2h) - #890
Merged
Conversation
…#752, phase 2h) A suffix word reading beside a name reading now derives SUFFIX_WORDS_AMBIGUOUS (Lexicon.suffix_words_ambiguous), gated as an ambiguous acronym is, by the words to spare, at the same sites (rules/S11, a suffix word that is also a name). The kind says what the writing means: French fils is the generation in lower case in a mixed-case name and leans to the name in Title case (rules/S6); the new `agnomen` kind (filho, filha, neto, neta, sobrinho, sobrinha in pt.toml, netto in pt-BR.toml) is read by the count alone, listed in AGNOMENS (Lexicon.agnomens), and build check 11 refuses one with no name reading. `default = false` gets its meaning: a reading recorded and checked that compiles to nothing, for a pack (Spanish h, the German regnal i, Czech st, whose exclusion it replaces). attaches stays reserved for phase 2, prefer and strict for phase 3, and bare_only, leading_only, trailing_only and separators move to phase 4. Pedro Alves Filho reads family Alves, suffix Filho; Ana Neto and Marie Fils keep their family names; each reports suffix-or-name. Measured with --base against 225f3d6: committed corpora 4 names, PSC 23 fixed / 20 broken / 8 changed, tse-donors 21,059, ctgov 110, FEC 12 reports (decisions/S11). Lexicon pickles from earlier releases no longer load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… against the acronym branch, refuse an acronym agnomen, gate only generation and agnomen readings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd its glued-initial exception stated whole; the fils note in the release log and customize; the pair counts' recompute Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s pointer and customize's reason; record Derek's count-only call Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… read Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and no company (#890) Pedro Junior Filho read suffix 'Junior Filho' with no family name: the agnomen's count took Junior as its spare word and the peel then took Junior as a suffix, and S7's company read the agnomen as a credential behind it. A generation word that is also a name now counts only the name words in front of it and keeps no company, so Pedro Junior Filho, Pedro Júnior Neto, Pedro Jr. Filho and Pedro Junior Filho, MD read middle 'Junior', family 'Filho' as master does (Derek approved before merge). rules/S11 and S7 amended; decisions/S11's accepted cost superseded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eration word too (#890 review) Pedro VI Filho and Pedro MA Filho still lost their family name: the count skipped only suffix pieces, and VI (a shape-only numeral) and a capitals MA (its writing a suffix) are what the trailing run takes without being suffix pieces. The count now looks past whatever the walk would peel there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… walk keeps, members carried in front included (#890 second review) Pedro Junior Ma Filho, Pedro PhD Ed Filho and Pedro Junior do Filho still lost their family name: a bare member rules/S7's company carries was counted, then peeled. _taken_in_front replaces the two helpers with one scan over what the walk takes in front of a gated generation word, stopping at the first word it keeps. Asking the walk itself was tried: exponential on a run of agnomens and quadratic memoized, which two new scaling rows (agnomens, carried_agnomens) refuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st (#890 third review) _taken_in_front was re-run for each member it stepped past, so a run of members a credential carries cost m**2/2 steps (15.6x in is_suffix_piece calls for 4x the input). _kept_in_front returns where the walk's last kept word is in one pass. A _REREAD_SHAPES row, agnomen_front, counts is_suffix_piece calls over 'Pedro PhD Ma...Ma Filho': 12.0x on the previous commit, under the bound now. Readings are unchanged from the previous commit over a 9,576-input grid under all three orders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Junior fils keep their family name (Derek, #890) A lower-case fils in a mixed-case name was taken with no word to spare, as an acronym's capitals are, so Dumas fils read given 'Dumas' with no family and Pedro Junior fils suffix 'Junior fils'. The floor is the gate's first step, so case now settles a gated generation word only where the name keeps a family word; both read family 'fils' as master does. After a comma that names the family, lower case still settles it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#890 review) The comma decision took a lower-case fils after a comma with no name before it as the suffix, leaving no family name (', Dr. fils', '(Pe), Dr. fils'). segment_suffix_reading and C4's settled-by-capitals test now take a gated generation word's lean only where the head names a family. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nothing to the count (#890 review) The head's name-word count over-counted a joined salutation ('Mr. and Mrs., fils') and a lone name word behind a given-name title ('Sir Alexandre, fils'), so lower case still emptied the family there. The case cue now waits for C4's two name words before the comma, which the count reads first: 'Dumas, fils' reads given 'fils' as master does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2h of #752: generation readings gated by kind. Addresses #843's agnomens.
What changes
A generation word that is also a name is gated. Such a word now reads as the suffix only where the name has a word to spare, the way a bare ambiguous acronym (
Ma) does, and the parse reports the choice assuffix-or-name. Agenerationoragnomenreading beside agivenorfamilyreading derives the newSUFFIX_WORDS_AMBIGUOUS(Lexicon.suffix_words_ambiguous), the third derived marker after phase 2a's two. The rule is rules/S11, a suffix word that is also a name.The Brazilian agnomens (
filho,filha,neto,neta,sobrinho,sobrinhainpt.toml, andnettoin a newpt-BR.toml) get a newagnomenkind.AGNOMENS(Lexicon.agnomens) lists them.French
filsloses its exclusion and takes agenerationreading beside its family reading. In a mixed-case name, lower case makes it the generation and Title case leans it to the name (rules/S6's new bullet).default = falsenow marks a reading that is recorded and checked but compiles to nothing, for a language pack to turn on in phase 3. It applies to Spanishh(hijo), Germanifor the regnal ordinal writtenI., and Czechst, whose exclusion it replaces. Each of these is written exactly as an initial is, so nothing in its writing tells the two readings apart.Reserved names.
attachesstays reserved for phase 2, andpreferandstrictfor phase 3.bare_only,leading_only,trailing_onlyandseparatorsmove to phase 4.New build checks, each with a mutation test:
default = trueis refused.Readings:
Pedro Alves FilhoAlves, suffixFilhoAlves, familyFilhoAlexandre Dumas filsDumas, suffixfilsDumas, familyfilsAna NetoNetoPEDRO FILHOFILHOMarie FilsFilsCase repair writes a suffix
filsin lower case, so the repaired name parses the same way again.Lexicon guard. A gated word listed as an unambiguous acronym now raises
ValueError. Without it the word would bypass its gate. The v1 shim subtracts the overlap instead, so a config that 1.4 accepted never raises.Pickles.
Lexicongains two fields, so a Lexicon or Parser pickled by an earlier release no longer loads.Measured
Every local check ran with
--baseagainst a checkout of master 225f3d6. Figures are counts and token shapes only.Pedro Alves Filho,Marie Fils(a report), and CLDR's French… de Bouchart filsand its family-first twincldr_agreement.pylocal_agreement.py psc-individuals)Neto, MD, asJúnior, MDreads). 4 are reports only.local_corpora.py pairs tse-donors --agreementreports in whole percents, which do not move for these counts. decisions/S11 gives the recipe.Pedro J. Neto, 568 tse names). Most of those initials abbreviate the surname.filsin a mixed-case name is the suffix only where the name keeps a family word, and at the first slot after a comma only behind rules/C4's two name words.Dumas fils,Pedro Junior fils,, Dr. fils,Dumas, fils,Mr. and Mrs., filsandSir Alexandre, filskeep a family word as master does;Alexandre Dumas fils,Alexandre Dumas, filsandDumas, Alexandre filsread suffixfils.Pedro Junior Filho,Pedro Júnior Neto,Pedro Jr. Filho,Pedro Junior Filho, MD,PEDRO JUNIOR FILHO,Pedro VI Filho,Pedro MA Filho,Pedro Junior Ma FilhoandPedro Junior do Filhoread as master does, the agnomen the family name. The scan is one pass, guarded by new scaling rows (agnomens,carried_agnomens, and the frame-countedagnomen_front).FH229,NT119,FO99 and smaller ones.Docs
filsreplaced.Checks
uv run pytestand-n0 -m serialpass, and so do--python 3.15, mypy, ruff, the sphinx doctest build andtools/vocab/build.py --check.🤖 Generated with Claude Code