Skip to content

Mark si and chi as possible surnames, not only credentials - #794

Merged
derek73 merged 6 commits into
masterfrom
fix/issue-791-si-chi-ambiguous
Oct 21, 2026
Merged

derek73 merged 6 commits into
masterfrom
fix/issue-791-si-chi-ambiguous

Conversation

@derek73

@derek73 derek73 commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #791.

What changes

si and chi were unambiguous post-nominals from the 2019 bulk import. Both are common surnames (US Census 2010: Si 1,166 family-name bearers, Chi 7,273; measured with tools/name_usage.py on 2026-10-21), so they join the ambiguous set that ba and meng use (may_be_name = true, issue = 791). Their bearer counts sit in family and given readings with as_of.

  • Luo Si gives family Si, where 2.0.0 through 2.5.0 gave suffix Si with no family name.
  • Wang, Si gives given Si, where those releases gave suffix Si with no given name.
  • A Title-case Si after a full name takes the family name, as Ma does (John Smith Si: middle Smith, family Si).
  • A capitalized SI after a full name is still a credential: John Smith SI gives suffix SI, flagged.

The ambiguity is reported (suffix-or-name), so the caller can see the fork.

Measured moves

  • Corpus: no real corpus name holds si or chi as a word, so the snapshot moves nothing. Four shape-tagged rows (Luo Si, Min Chi, Wang, Si, Smith, Chi) are new entries in corpus_shapes.jsonl and snapshot.jsonl.
  • Order grid (144 cells per order; the re-runnable recipe is in the decisions entry): 104 moves under GIVEN_FIRST, 100 under FAMILY_FIRST, 100 under FAMILY_FIRST_GIVEN_LAST. No moved word is dropped.
  • Accepted costs, each pinned by a case row or recorded in the entry: John Smith Si and John Smith Si. read family (the ma/Ma shape, S6); John Smith Chi PhD stops at the declined pick; John, Si. reads title, as John, Ma. does; John Smith (Chi) reads nickname.
  • Known wording defect: John, Si. reports "read as a credential" while the word lands in the title field. Filed as Reports say "read as a credential" for a period-marked title after a comma #793 (Reports say "read as a credential" for a period-marked title after a comma #793). The field-naming test cannot take a row for it until that is fixed.

Where it is recorded

  • nameparser/vocab/en.toml: the two entries, with family and given readings and notes, and the rebuilt _compiled.py.
  • tests/v2/cases.py: 17 #791 rows, pinning the fork with the contrasting spellings (John Smith SI, John Smith, SI, John Smith S.I.), the empty and nickname heads, the caps lean, and the family-first roles. test_every_case_name_is_unique guards the table against repeated names.
  • docs/design/decisions/suffix-acronym-collisions.md: a dated 2026-10-21 entry with the precedence (S6 before S4), the period behaviour, the accepted costs, and the order-grid recipe.
  • docs/release_log.rst: a Behavior Changes bullet under 2.6.0; the Describe each word by its readings: per-word TOML vocabulary compiled to today's sets (phase 1) #737 bullet now says the re-encoding changes no word list and no parse.
  • AGENTS.md: "a trailing period-marked word the UNAMBIGUOUS SUFFIX vocabulary knows is still a suffix".

Checks

  • uv run pytest: 22,330 passed, 125 skipped, 3 xfailed.
  • uv run mypy and uv run ruff check: clean.
  • snapshot.py and cldr_agreement.py match their records. The JA view needs namedivider, which is not installed locally; CI's ja-extra job runs it.
  • The design-docs reviewer reviewed the entry twice, and the code, test and comment reviewers reviewed the PR. Their findings are applied in b1907247 and b23fb7b1; the remaining test gaps (suffix runs, all-lowercase si, the absence contrast, a title head) are follow-ups.

🤖 Generated with Claude Code

derek73 and others added 3 commits October 21, 2026 11:26
si and chi were unambiguous post-nominals from the 2019 bulk import.
Both are common surnames (Census 2010: Si 1,166, Chi 7,273), so they
join the ambiguous set the way ba and meng did: a full name in front
keeps the credential by the words-to-spare count, and a bare or
comma-form one reads the name with the fork reported.

Adds the #791 case rows, a dated decisions entry, a release-log
bullet, and four shape-tagged rows (Luo Si, Min Chi, Wang, Si,
Smith, Chi). No real corpus name holds si or chi.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Records the grid as re-runnable text (templates, names, credentials,
comparator), fixes the Wang, Si Ming quote and the move count, states
the removal reason on C-i's default, and restates the report-wording
mismatch with what was measured.

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

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (e766bf1) to head (b14e4df).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #794   +/-   ##
=======================================
  Coverage   99.05%   99.05%           
=======================================
  Files          47       47           
  Lines        4642     4642           
=======================================
  Hits         4598     4598           
  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 and others added 3 commits October 21, 2026 11:58
- comma rows carry shape 2 (family comma); corpus_shapes regenerated
- bearer counts recorded as family and given readings with as_of
- empty-head, nickname-head, caps and family-first rows added
- credential_run row renamed to _chi; stale 2026-10-18 date fixed
- release-log #737 bullet qualified; #791 bullet names the Chi costs
- decisions entry: Meng./Lac. wording stated as checked

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…ase bullet (#794)

- Wang, SI row renamed comma_capital_si_after_a_surname_is_a_suffix
  (it shared a name with the John Smith, SI row)
- test_every_case_name_is_unique, with a recorded negative control
- #791 release bullet trimmed to one before/after and the limits
- #737 bullet reworded to the re-encoding: it changes no word list
  and no parse, so it no longer conflicts with #791's bullet

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The uniqueness test had been inserted between the shape-tag comment
block and its decorator; move it above the comment.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit d997810 into master Oct 21, 2026
12 checks passed
derek73 added a commit that referenced this pull request Oct 22, 2026
#811)

* Name the bound field in the comma report on a listed member (#793)

After a family comma the listing form binds a marked member the reading
declines as a title ('John, Si.', 'John, Ma.'), but its suffix-or-name
report said "read as a credential". The report now names the role the
comma bound: "read as a title" there, "read as a credential" for a
suffix ('John, MA'). No reading moves.

Adds the two rows the field test now checks (control: 6 parses fail
with the old wording) and the #794 review's eleven rows pinning the
#791 members in suffix runs, behind titles, all-lower and in
non-trailing positions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Point decisions/A1 and C11 at #793's report fix (docs review)

A1's #626 entry listed the comma's credential reading among reports
worded where the field is settled; #793 showed the listing form binds
it as a title. C11's history now reaches the entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug vocabulary Per-word vocabulary model and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Luo Si" and "Min Chi" lose their family name: Si and Chi read as credentials

1 participant