Skip to content

Keep a title only inside a phrase on the Spanish given-name lists, and record #1482, #1401 and #1375 (#1476) - #1509

Merged
derek73 merged 8 commits into
masterfrom
fix/issue-1476-es-titles-in-lists
Nov 21, 2026
Merged

derek73 merged 8 commits into
masterfrom
fix/issue-1476-es-titles-in-lists

Conversation

@derek73

@derek73 derek73 commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Closes #1476
Closes #1482

#1401 stays open: decided 2026-11-19 as not in 3.2, the issue left open for the condition that would reopen it.

#1476: the Spanish given-name lists keep a title only inside a phrase

tools/es_given_names.py no longer leaves out a word the default vocabulary reads as a title only inside a title phrase (titles_ambiguous, rules/H9). In the middle of a name, which is where rules/O6's veto reads the list, such a word is a name word. A listed title (dr, prof) and the ambiguous particles and suffixes stay out.

parser_for(locales.ES_AR)
Maria Emerita Garcia      → middle 'Emerita', family 'Garcia'   (3.1.0 the same; master since #1471: family 'Emerita Garcia')
Garcia Emerita Maria (FF) → given 'Emerita', family 'Garcia'    (master: family 'Garcia Emerita')
Professor Emerita Garcia  → title 'Professor Emerita'           (unchanged: the phrase takes it first)

The lists, regenerated from the cached INE tables:

  • locales.ES_AR gains cheikh, emerita, grace and mahdi. It loses rehan, shamim, wenjie and zakarya at its 5,000-word cutoff.
  • locales.ES moves for another reason. ait became a particle on 2026-11-13 (Is ben/bin/בן a particle, a patronymic marker, or a given name? (Karim Ben Salah, בן כספית, Youssef Ait Taleb) #1257), after the lists were last written on 2026-11-05. A surname written behind it (Ait Lahcen) no longer counts against the bare word, so lahcen passes the share and pushes rim past the 1,000-word cutoff. No titles_ambiguous word reaches this list at its 90% share.
  • The Portuguese list is cut by tools/pt_given_names.py, which uses the same excluded_words, so the same rule reaches it. Re-run, the tool writes it unchanged, and its test's guard narrows the same way.
  • The surname tally reads the same with the narrowed set (it passes excluded as after), so no word moves for that reason.

Measured 2026-11-20 against a checkout of master 89ec747c.

Fixed Broken Changed
local_agreement.py orcid-researchers --base --locale es_ar, every country (1,823,708 records) 407 96 22
the same, in Spanish-speaking countries 3 0
--locale es, every country 2 14
  • By the word moved, under ES_AR:
    • grace 256 fixed / 4 broken;
    • mahdi 142 / 24;
    • cheikh 7 / 15 (Maghrebi surnames that open with it: invented Ana CHEIKH MOUSSA);
    • the four words leaving at the cutoff, 2 / 53.
  • Under ES: every break is rim (a Korean or Arabic given name, invented Young Rim Oh), and none is in a Spanish-speaking country.
  • config_diff.py score --languages es over ORCID, PatentsView and PSC compared master's lists (loaded from the checkout with an expr: spec) with the new ones:
    • ES_AR: 1 fixed in ORCID Chile, 1 in Paraguay, 1 broken of PSC's 6,089 Spanish filers;
    • ES: every group unchanged to two decimals.
  • ORCID holds no emerita record that moves.
  • The sweep: every joining word across the comma shapes, all three name orders, inside its phrase, and as initials (Garcia, M. E., Garcia, C., M. Emerita Garcia). Only the joining words move, each from family to middle, as listed given names do. Comma shapes and initials don't move.

Judgment call, flagged: I kept the regenerated ES list, so the list matches its tool, rather than keep the stale one. Its swap breaks 14 ORCID records and fixes 2, none of them Spanish-speaking. Reverting nameparser/locales/_es_given_names.py would undo it alone.

#1482: recorded, declined for now

No code. decisions/O6 gets a dated "Declined, for now" entry with the 2026-11-19 prototype's tables:

  • agreement, and fixed/broken, for ORCID, PSC and PatentsView, with their populations;
  • the tse-donors run on names as written;
  • the ceiling;
  • the reopen condition.

A comment on the issue gives the finding.

#1401: recorded, left open

decisions/group-suggestion records option C: the suggester keeps its own predicates for reading past titles and post-nominals. The entry gives the 2026-11-15 figures for options A and B and names GOV.UK's people as the population to watch.

#1375: recorded

Relates to #1375, which is already closed as not planned. decisions/M1 gets a Standing line and a dated Declined bullet: a bracket in the family part before a family comma is not read as the maiden name by default (Smith (Jones), Jane reads nickname 'Jones'), unless the caller declares the pair in maiden_delimiters. The bullet gives the FEC count from 2026-11-12 as the evidence. No code or user-doc change.

A stray label

tests/v2/cases.py's alias_marker_behind_a_maiden_marker_left_a_word (#1504) said parity, but 1.4.0 reads middle 'Smith née @', family 'JJ'. Every wheel from 2.0.0 to 3.1.0 reads it as the row does, so it is now fix(#274), the maiden-marker issue. parity_check.py lists nothing now.

Changes

Checks

All pass:

  • the full suite, with and without the ja extra, and on 3.15 in its own environment;
  • -m serial;
  • ruff and mypy;
  • build.py --check;
  • the Sphinx doctest build and the README doctest;
  • parity_check.py: 0 of 748 parity rows differ from 1.4.0.

One recorded control moved: test_layering.py's _UNGUARDED_READS tools count, 35 → 34, because the Spanish tool reads one set fewer.

Reviews

🤖 Generated with Claude Code

derek73 and others added 8 commits November 20, 2026 18:31
)

tools/es_given_names.py no longer leaves out a word the default reads as
a title only inside a title phrase (titles_ambiguous, rules/H9): in the
middle of a name, where rules/O6's veto reads the list, it is a name
word. locales.ES_AR's list regains emerita, so "Maria Emerita Garcia"
reads middle 'Emerita' again, as 3.1.0 did, and gains cheikh, grace and
mahdi. locales.ES's list, regenerated too, moves by #1257's ait particle
(lahcen joins, rim leaves). decisions/O6 records the reversal and the
measurement.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
decisions/O6 records the whole-family reading under the Portuguese
packs, measured 2026-11-19 on a scratch prototype, as declined for 3.2
with its tables and the condition that would reopen it.
decisions/group-suggestion records option C of #1401: the suggester
keeps its own predicates for reading past titles and post-nominals.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tools/differential/parity_check.py listed it: 1.4.0 reads 'Jane Smith
née @ JJ' as middle 'Smith née @', family 'JJ'; every release since
2.0.0 reads the maiden marker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n name by default

decisions/M1 gains a Standing line and a dated Declined bullet: no
universal convention writes a maiden name in brackets, and the 94 FEC
names with a bracket before the comma (measured 2026-11-12) mix other
surnames, filers' notes, nicknames and credentials. A caller declares
the pair in maiden_delimiters.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tools/pt_given_names.py cuts its list with es_given_names'
excluded_words, so it keeps a title only inside a title phrase as
well; its test and docstring now say so, and decisions/O6's line names
both lists. Re-run, the tool writes the Portuguese list unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…1476 entry

Both declined entries move to 2026-11-19, the day they were decided,
and the #1482 line says every surname but the last two stays a middle
name; the #1482 entry says it cannot be recomputed from the tree. The
#1476 entry's history names locales.ES's list alone as written before
#1257, quotes rules/H9's own words, names the tally's whole excluded
set, and gives the per-word counts that sum to its 407 records.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…recipe

The second review of the fix commits: the entry opens with its
capitalized verdict, stands after the entries it follows in date, and
says how its FEC count is re-taken; the layering control's comment
records its tools count moving 35 -> 34.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@derek73 derek73 added this to the 3.2 milestone Nov 21, 2026
@derek73 derek73 added bug docs Documentation fixes and updates tooling locale-packs Locale packs and language choices (nameparser.locales) labels Nov 21, 2026
@derek73 derek73 self-assigned this Nov 21, 2026
@derek73
derek73 merged commit 0d8c6fa into master Nov 21, 2026
14 checks passed
@derek73
derek73 deleted the fix/issue-1476-es-titles-in-lists branch November 21, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug docs Documentation fixes and updates locale-packs Locale packs and language choices (nameparser.locales) tooling

Projects

None yet

1 participant