Skip to content

Add Júnior as a generation word (#843) - #856

Merged
derek73 merged 2 commits into
masterfrom
claude/portuguese-words-843-0ed5d6
Oct 23, 2026
Merged

derek73 merged 2 commits into
masterfrom
claude/portuguese-words-843-0ed5d6

Conversation

@derek73

@derek73 derek73 commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Refs #843 (left open: the agnomen question).

José Silva Júnior now reads family Silva, suffix Júnior, as José Silva Junior does; 1.4.0 through 2.5.0 read middle Silva, family Júnior (checked against the 1.4.0 and 2.5.0 wheels).

What changed

  • nameparser/vocab/pt.toml: júnior as a generation reading, same_as = "jr", rebuilt into _compiled.py.
  • decisions/generational-words: Standing lines for júnior (it inherits junior's vetting and accepted collisions) and for the agnomens (Filho, Neto, Netto, Sobrinho and feminines stay family names, nothing refuses them), the Open line for Should José Silva Júnior read Júnior as a suffix, as José Silva Junior does, and where do Filho, Neto and Sobrinho belong? #843, and a dated Log entry with the measurements below. Derek's call: "Suffix, Júnior only for now."
  • rules/S2 (a suffix word ends a name and never opens the string): José Silva Júnior → suffix="Júnior" and the boundary Pedro Alves Filho → family="Filho".
  • tests/v2/cases.py: the fix row and its contrast row (parity, checked against the 1.4.0 wheel).
  • tests/v2/test_local_corpora.py: the accents-only pairs test used JÚNIOR / JUNIOR as its split pair, which now agrees. It now splits on SÁ / SA (listed) and MÁ / MA (under ten), and keeps the Júnior rows as agreeing pairs.
  • Release log bullet; snapshot.jsonl and corpus_rules.jsonl gain the two new rule examples (no existing corpus name moved).

Measured (2026-10-23)

  • Júnior reads as Junior in all 120 pairs of a 20-shape grid (comma shapes, empty head, title, particle, trailing title, nickname, maiden clause, credential, a name word behind it, both one-case spellings) × 3 orders × composed/decomposed, comparing fields, ambiguity kinds and initials(). With júnior removed, 108 differ; the other 12 hold Júnior where no suffix reading reaches (Júnior Silva, Júnior, José).
  • Local corpus tse-donors, against the tree before this change: 993 of 848,351 filed names move. 990 end in Júnior and gain it as the suffix (3 of them two-word names, RONALDO JÚNIOR, left with no family as RONALDO JUNIOR is). The other 3 have Júnior mid-name, where it starts the S8 credential run, as JUNIOR already does (JORGE ANTÔNIO JÚNIOR BARBOSA SILVA → suffix 'JÚNIOR BARBOSA SILVA').
  • local_corpora.py pairs tse-donors --agreement: the JÚNIOR / JUNIOR split (866 accents-only pairs read with two surnames) is gone; SÁ / SA 255 remains (separate issue, filed with this PR).

A design-docs review found a Standing line stated for every accented spelling and two counts naming the wrong population; both are fixed in the second commit.

🤖 Generated with Claude Code

derek73 and others added 2 commits October 23, 2026 14:24
`José Silva Júnior` now reads family Silva, suffix Júnior, as
`José Silva Junior` does; 1.4.0 and 2.5.0 read middle Silva, family
Júnior. The Brazilian agnomens (Filho, Neto, Sobrinho) stay family
names, the question left open on #843 (Derek, 2026-10-23).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 2.6 milestone Oct 23, 2026
@derek73 derek73 added the vocabulary Per-word vocabulary model and language packs label Oct 23, 2026
@derek73 derek73 self-assigned this Oct 23, 2026
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (48ed448) to head (50b3f1c).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #856   +/-   ##
=======================================
  Coverage   99.05%   99.05%           
=======================================
  Files          47       47           
  Lines        4669     4669           
=======================================
  Hits         4625     4625           
  Misses         44       44           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@derek73
derek73 merged commit 332f24a into master Oct 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vocabulary Per-word vocabulary model and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant