Skip to content

Commit bf2b615

Browse files
committed
Round 7: 21 more patterns — 復/複 confusion, number bases, syscalls, UI
The most impactful catch this round: S-Chinese conflates 復 (= "again") and 複 (= "duplicate"). The compound 復制 (S) is widespread but should be 複製 in T-Chinese — 復 is the wrong radical for "duplicate". Same applies to 復用 vs 重用. These two were in the agent doc table but never made it into the test regex set; that gap closes here. Patterns added: `復` / `複` distinction: 復制 → 複製 (very common — S `復` ≠ T `複`) 復用 → 重用 編寫 → 撰寫 Number bases: 二進制 → 二進位 八進制 → 八進位 十進制 → 十進位 十六進制 → 十六進位 進制 → 進位 (general; excludes the 4 specific compounds above via negative-lookbehind) Serial / parallel / stack / files: 串行 → 串列 堆棧 → 堆疊 二叉堆 → 二元堆積 壓縮文件 → 壓縮檔 Kernel / syscalls / messaging: 用戶態 → 使用者模式 系統調用 → 系統呼叫 調用 → 呼叫 (excludes 失調用 / 強調用 via negative-lookbehind) 反向工程 → 逆向工程 私聊 → 私訊 UI controls / parts / identifiers: 控件 → 控制項 部件 → 元件 標識 → 標示 (excludes 標識符 already covered) 圖元 → 像素 Tried and reverted: 跨度 → 跨距 / 範圍 — turned out to false-positive on TW-acceptable 「時間跨度」 in regen_llm_security_batch_zh_tw.py. 跨度 is standard TW vocabulary too; removed from the pattern set. s_only_patterns now holds 233 regex entries across 26 sub-sections in the agent doc table. No new offenders in zh-tw content. 510/510 pytest pass.
1 parent b48d17f commit bf2b615

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

.claude/agents/language-vocabulary-check.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,50 @@ right bucket.
416416
| 命令行 | 命令列 (CLI) | command line |
417417
| 流水線 | 管線 | CI/CD pipeline |
418418

419+
#### `` vs `` (S conflates them; T-Chinese distinguishes)
420+
421+
| S-Chinese | T-Chinese | Meaning |
422+
|---|---|---|
423+
| 復制 | 複製 | duplicate / copy (S `` = "again", T `` = "duplicate") |
424+
| 復用 | 重用 | reuse |
425+
| 復健 / 復活 / 復原 | (same, all use `` correctly = "again") | recover / revive |
426+
427+
#### Number bases
428+
429+
| S-Chinese | T-Chinese | Meaning |
430+
|---|---|---|
431+
| 二進制 / 八進制 / 十進制 / 十六進制 | 二進位 / 八進位 / 十進位 / 十六進位 | binary / octal / decimal / hex |
432+
| 進制 | 進位 | base / radix (general) |
433+
434+
#### Serial / parallel / stack / files (continued)
435+
436+
| S-Chinese | T-Chinese | Meaning |
437+
|---|---|---|
438+
| 串行 | 串列 | serial (transmission) |
439+
| 堆棧 | 堆疊 | stack (alternate S spelling) |
440+
| 二叉堆 | 二元堆積 | binary heap |
441+
| 壓縮文件 | 壓縮檔 | compressed archive |
442+
443+
#### Kernel / syscalls / messaging
444+
445+
| S-Chinese | T-Chinese | Meaning |
446+
|---|---|---|
447+
| 用戶態 | 使用者模式 | userspace / user mode |
448+
| 系統調用 | 系統呼叫 | system call |
449+
| 調用 | 呼叫 | call / invoke (negative-lookbehind to skip `失調用` / `強調用`) |
450+
| 反向工程 | 逆向工程 | reverse engineering |
451+
| 私聊 | 私訊 | private message |
452+
| 編寫 | 撰寫 | write (code / a document) |
453+
454+
#### UI controls / parts / identifiers
455+
456+
| S-Chinese | T-Chinese | Meaning |
457+
|---|---|---|
458+
| 控件 | 控制項 | UI control / widget |
459+
| 部件 | 元件 | component / part |
460+
| 標識 (≠ 標識符) | 標示 / 識別 | label / marker |
461+
| 圖元 | 像素 | pixel (Chinese-academic S form) |
462+
419463
### Simplified Chinese (zh-cn) — avoid Traditional vocabulary
420464

421465
Same idea in reverse. Common offenders that occasionally leak from

tests/test_i18n.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,39 @@ def test_zh_tw_files_use_traditional_chinese_vocabulary():
454454
(re.compile(r"服務質量"), "服務質量 → 服務品質 (QoS)"),
455455
(re.compile(r"命令行"), "命令行 → 命令列 (CLI)"),
456456
(re.compile(r"流水線"), "流水線 → 管線 (CI/CD pipeline)"),
457+
# Round 7 — common verbs / number bases / kernel terms / UI controls
458+
# that were in the agent doc but never in the test.
459+
# `復` (= again) vs `複` (= duplicate). S 復制 / 復用 conflate them.
460+
(re.compile(r"復制"), "復制 → 複製 (S `復` ≠ T `複`)"),
461+
(re.compile(r"復用"), "復用 → 重用"),
462+
(re.compile(r"編寫"), "編寫 → 撰寫"),
463+
# Number bases.
464+
(re.compile(r"二進制"), "二進制 → 二進位"),
465+
(re.compile(r"八進制"), "八進制 → 八進位"),
466+
(re.compile(r"十進制"), "十進制 → 十進位"),
467+
(re.compile(r"十六進制"), "十六進制 → 十六進位"),
468+
(re.compile(r"(?<![進])進制"), "進制 → 進位"),
469+
# Serial / parallel transmission.
470+
(re.compile(r"串行"), "串行 → 串列"),
471+
# Files / containers.
472+
(re.compile(r"壓縮文件"), "壓縮文件 → 壓縮檔"),
473+
(re.compile(r"二叉堆"), "二叉堆 → 二元堆積"),
474+
(re.compile(r"堆棧"), "堆棧 → 堆疊"),
475+
# Messaging.
476+
(re.compile(r"私聊"), "私聊 → 私訊"),
477+
# Kernel / syscalls.
478+
(re.compile(r"用戶態"), "用戶態 → 使用者模式"),
479+
(re.compile(r"系統調用"), "系統調用 → 系統呼叫"),
480+
(re.compile(r"(?<![失強])調用"), "調用 → 呼叫"),
481+
# Engineering / reverse engineering.
482+
(re.compile(r"反向工程"), "反向工程 → 逆向工程"),
483+
# UI controls / components.
484+
(re.compile(r"控件"), "控件 → 控制項"),
485+
(re.compile(r"部件"), "部件 → 元件"),
486+
# Identifiers / labels.
487+
(re.compile(r"標識(?![別字符碼])"), "標識 → 標示 (`標識符` already covered)"),
488+
# Image / pixel.
489+
(re.compile(r"圖元"), "圖元 → 像素"),
457490
]
458491
zh_tw_paths = [
459492
_REPO_ROOT / "scripts" / "regen_llm_security_batch_zh_tw.py",

0 commit comments

Comments
 (0)