Skip to content

Read a particle phrase as the second given name; leave Kaur and Singh to neither two-name switch (#704) - #1057

Merged
derek73 merged 8 commits into
masterfrom
claude/issue-704-particle-given-names-43f863
Nov 4, 2026
Merged

derek73 merged 8 commits into
masterfrom
claude/issue-704-particle-given-names-43f863

Conversation

@derek73

@derek73 derek73 commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Part of #704: the particle-phrase question O7 (two given names) left open, plus Kaur/Singh. Both are behind the opt-in switches; a parse with both switches off does not move (snapshot: new example texts only, no reading moved; a 16-name × 8-shape grid under every name_order and switch pairing, token readings and Reading.languages included, moved no default-policy parse against a1b3e186).

What changes

Two name-reading properties, read only by rules/O7 (two given names) and rules/O6 (two family names):

  • after_particle on a given reading: the word behind a particle that writes the second of a compound given name. Under two_given_names, María del Carmen García reads given María del Carmen, family García (1.4.0 through 2.8.0, and the default now: given María, family del Carmen García). O6 leaves such a phrase where it stands (given-first, beside a one-word given name only; under a family-first order or behind a middle it is taken as before), so María del Carmen de la Vega with both switches on reads given María del Carmen (the Should two_family_names leave a known given name out of the family, so "José Luis Pérez" keeps family "Pérez"? #959 entry recorded family del Carmen de la Vega; superseded in decisions/O6). Maria do Carmo Silva keeps family do Carmo Silva.
  • shared on a name reading: a name a community gives every member, Sikh kaur and singh (mul.toml, so a strict choice of any language keeps them). Neither switch takes or completes one, so Harpreet Kaur Dhillon keeps middle Kaur under O7 (was given Harpreet Kaur) and under O6 (was family Kaur Dhillon), as the default reads it.

Each compiles to an internal set (PARTICLE_GIVEN_NAMES, SHARED_NAMES), tagged at classify, the tag dropped from published tokens. A caller marks a word with Lexicon.add("carmo", kind="given", after_particle=True).

Design, decided in chat

Options weighed (decisions/O7's 2026-11-03 entry): (A) a phrase reading, (B) a property on the object word, (C) a list on the rule / [rules], (D) O6's given-name list. B was chosen: the particle cannot carry it (del Carmen / del Río), and B fits the one-word reading model, language choices and strict mode. For Kaur/Singh, an O6+O7 decline (like O7's patronymic decline) was chosen over a view of its own or leaving them alone.

Measurements (2026-11-03)

  • ORCID (Spain + Spanish-speaking America): given box ending in particle + word vs family box opening with particle + word + more. The marked words reach ≥90% with ≥10 given records (carmen 1,261 / 5, pilar 322 / 1, valle 235 / 26, rosario 260 / 27). No Portuguese word reaches the bar (carmo 21 / 6, conceição 25 / 25), so do Carmo is not marked. Left out by count: unaccented jesus (Brazil 67 / 41), luz, cruz, paz, dios. Left out despite the count: c. (an initial) and piero.
  • PSC agrees where it can: del Carmen goes in the middle-name box 21 times and the surname box 2.
  • Kaur/Singh, PSC: Kaur goes in the middle-name box 2,354 times, is the whole surname 674 times and goes in the forename box 25 times. For Singh it is 5,303, 1,885 and 48. ORCID, where a surname follows: Kaur goes in the given box 70 times and opens the family box 3 times.
  • Cost: Singh is also a Rajput and Nepali surname, so Ram Bahadur Singh Thakuri under O6 keeps middle Singh.

Review round 1 (fixed in a5ea25f)

  • O6's veto first fired under family-first orders and behind a middle (García del Valle María, and Juan Antonio del Valle de la Vega under locales.ES); now scoped to the shape O7 takes.
  • O7's phrase path could leave a lone connective as the family (María del Carmen y) and skipped the Turkic-marker guard; both refused now.
  • kaur/singh were in pa.toml, so parser_for(locales.ES, strict=True) still read family Kaur Dhillon; moved to mul.toml.
  • Docs: O7's When/Then name the particle phrase, its precedence is scoped to marked words, P2 and mechanisms.md (UNIT-PARTITION, DECLARED-SPAN) name the new cut, superseded entries carry head notes.
  • For your call: O7 now reads a vocabulary signal beside its switch, so it is a split candidate, recorded in decisions/O7 Standing as "for review", mirroring O6's given-name veto, which stayed a clause.

Review round 2: comments and test gaps (6e5d61c, 5557aaa)

  • The comment pass corrected stale lists of a name reading's properties, scoped O6's decline to a one-word given name where comments still said it applied everywhere, fixed a doc recipe that raised (Lexicon.default().add(...)), and folded the release bullet into the switch's.
  • The test pass mutated each new condition. One real bug came out of it: Abu Bakr (abu is a particle and a bound word both) counted as one given word, so O7 read Abu Bakr Carlos García as given Abu Bakr Carlos, against O7's own bound-pair clause, since Add Policy.two_given_names, the compound given name as a rule kind (3.0, 4g) #954. It is now counted as two (rule row added). New test rows cover:
    • each surviving guard;
    • a strict ES parser;
    • the two new tags staying off published tokens;
    • a pickle round trip.

Recorded, not coded

  • Lim Mei Ling Jessica: accepted. Written Lim Mei Ling (Jessica) under FAMILY_FIRST with O7, it reads given Mei Ling, family Lim, nickname Jessica (decisions/O7 Standing).
  • Whether the default should read a marked phrase as a middle name (PSC filers do): it moves the default, so it is left for its own decision.
  • dels stays out of ca.toml: with the switch off, the property changes nothing, so a dels particle would still move Maria dels Àngels Puig from middle to family.

Docs

rules/O6 and O7 amended (new Except bullets, O7's Then bullet, precedence, Accepted; rules_budget.json re-recorded: O6 +80 words, O7 +101). Both new clauses read a vocabulary lookup at the slot the switch moves, the signal O6's given-name list already reads. decisions/O6 and O7, vocab README property rows, customize.rst (doctested), AGENTS.md compiled-set list, release log.

Tests: a recorded negative-control table (_EFFECT_704, 19 rows, 10 moved by the properties), the caller path, the property and compile tables. Full suite, serial benchmarks, mypy, ruff, sphinx doctest pass.

🤖 Generated with Claude Code

…ingh to neither switch (#704)

Two name-reading properties, read only by rules/O7 (two given names)
and rules/O6 (two family names), so a parse with both switches off
moves nowhere:

- after_particle, on a given reading: the word behind a particle that
  writes the second of a compound given name. Under two_given_names,
  "María del Carmen García" reads given "María del Carmen", family
  "García"; O6 leaves the phrase where it stands. 23 Spanish words are
  marked, those ORCID holders write behind a particle in the given box
  at least nine times in ten; "do Carmo" stays the family.
- shared, on a name reading: a name a community gives every member,
  Sikh kaur and singh. Neither switch takes or completes one, so
  "Harpreet Kaur Dhillon" keeps middle "Kaur" under either, as the
  default reads it and as UK PSC filers box it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.0 milestone Nov 4, 2026
@derek73 derek73 added enhancement design vocabulary Per-word vocabulary model and language packs labels Nov 4, 2026
@derek73 derek73 self-assigned this Nov 4, 2026
derek73 and others added 3 commits November 3, 2026 22:10
…'s phrase path, Kaur and Singh to mul.toml

- O6 declines a marked particle phrase only given-first, beside a given
  name of one word: under a family-first order (García del Valle María)
  and behind a middle (Juan Antonio del Valle de la Vega, which
  locales.ES reads) it is taken as before.
- O7's phrase path leaves a name word that is no lone connective or
  particle (María del Carmen y), and no Turkic marker's father.
- kaur and singh move to mul.toml, so a strict choice keeps them
  (parser_for(locales.ES, strict=True) read family Kaur Dhillon).
- Build-check mutation rows for shared and after_particle.
- Docs: O7's When and Then name the particle phrase, its precedence is
  scoped to marked words; O6's listed-word sentence and Signal line;
  P2 and mechanisms.md name the new cut; superseded entries get head
  notes; counts corrected (Kaur 69, 23 words).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one-word given name, drop a dead particle test, pin the released shapes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derek73 and others added 4 commits November 3, 2026 22:21
…rticle-given-names-43f863

# Conflicts:
#	nameparser/vocab/es.toml
…'s are listed, scope O6's decline to the one-word given name, fold the release bullet into the switch's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ds the mutations reached

O6's count passes over a particle, so a bound given-name pair whose
bound word is also a particle (Abu Bakr) read as one word, and O7 took
a third (Abu Bakr Carlos García gave given 'Abu Bakr Carlos', against
O7's own bound-pair clause). _one_given_word counts it as two.

New rows for each surviving mutation: a shared word as the given name,
a family written before the given name, the given name's guards on the
phrase path, a shared given reading, a pickle round trip, the strict
ES parser, and the two tags staying off published tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 3b29377 into master Nov 4, 2026
13 checks passed
@derek73
derek73 deleted the claude/issue-704-particle-given-names-43f863 branch November 4, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design enhancement vocabulary Per-word vocabulary model and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant