Skip to content

Add Chinese and Japanese credential and office words as suffixes (#671) - #708

Merged
derek73 merged 4 commits into
masterfrom
claude/chinese-japanese-credentials-fbe100
Oct 18, 2026
Merged

derek73 merged 4 commits into
masterfrom
claude/chinese-japanese-credentials-fbe100

Conversation

@derek73

@derek73 derek73 commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #671.

What changes

Adds the Chinese and Japanese credential, office and generational words to SUFFIX_WORDS: 議員/议员, 国会議員/國會議員, 太平紳士/太平绅士, 医学博士/醫學博士, 二世, and the job titles 社長/部長/課長 with their simplified forms 社长/部长/课长. They read as suffixes when spaced or after a comma.

王雅婷,議員        → was given '議員'; now suffix '議員' (family stays 王雅婷)
彭德威 议员 (ZH)    → was middle '议员'; now family '彭', given '德威', suffix '议员'
佐藤恵子 国会議員   → was given '国会議員'; now suffix '国会議員'

ジュニア was already shipped by #661.

Scope decision

None of the words joins GLUED_HONORIFICS. The glued bar (#308: can the word never end a name?) needs real-name counts I could not get (the Wikidata suffix query timed out; the native-script corpus holds none of these words), and 部長 fails it on argument alone (阿部長). Glued vetting, and a name_usage that can answer it for CJK words, is #707.

The Han segmenter is not a peel and still exposes the words after a listed surname under locales.ZH: 王二世 reads family 王, suffix 二世 and 李部長 family 李, suffix 部長, as 王博士 already does. Recorded as Accepted in rules.md W2. 陳怡君二世 and 田中社長 are unchanged.

Review

Three review agents (code, tests, comments/docs) ran; their findings are fixed in 4eda2f10 (release-log span is 2.1 through 2.4.2, the tolerated comma example moved out of S2, stale notes, a row for 李部長) and ccef3d5b (a parametrized test over every word: suffix when spaced and after a comma, including one-word and empty heads, and none a glued honorific; adding two of them to GLUED_HONORIFICS fails it where six of twelve passed the suite before). 4fa21e8d adds the simplified job titles and a usage.rst note.

Verification

  • Full suite, ruff, mypy and the sphinx doctests pass; the suite also passes with the ja extra installed and uninstalled.
  • The snapshot moves four names, all fictional corpus_cldr.jsonl renderings; the CLDR agreement record moved 12 entries in the ZH view, in the expected direction.

🤖 Generated with Claude Code

Adds 議員, 国会議員, 太平紳士, 医学博士, 二世 and the job titles 社長/部長/課長
(with variant spellings) to SUFFIX_WORDS, so they read as suffixes when
spaced or after a comma instead of reversing the name or joining the
given name. None joins GLUED_HONORIFICS: the glued bar was not measured
against real names, and 部長 fails it outright (阿部長).

Amends rules.md S2/W2, adds the decisions.md entry, release-log bullet,
case rows, and re-records the snapshot and agreement records.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 2.5 milestone Oct 17, 2026
@derek73 derek73 self-assigned this Oct 17, 2026
@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.03%. Comparing base (f2bccf3) to head (4fa21e8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #708   +/-   ##
=======================================
  Coverage   99.03%   99.03%           
=======================================
  Files          46       46           
  Lines        4541     4552   +11     
=======================================
+ Hits         4497     4508   +11     
  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 17, 2026 14:44
Fix the release-log span (2.1, the first release with locales.ZH), drop
the 'reversed the name' claim, say the Chinese pack's surname split
exposes the words after a listed surname, move the tolerated comma
example out of S2, fix stale case notes and comments, and add a row for
李部長.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One parametrized test over all twelve words covers the spelling variants
and the comma shapes (one-word and empty head) the rows missed, and a
second asserts none is a glued honorific; adding two of them to
GLUED_HONORIFICS fails it where six of the twelve passed the suite.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ential words

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit b4a004c into master Oct 18, 2026
12 checks passed
@derek73
derek73 deleted the claude/chinese-japanese-credentials-fbe100 branch October 18, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chinese and Japanese credential words aren't recognized: 王雅婷,議員 reads given 議員, 陳怡君二世 reads given 怡君二世

1 participant