Skip to content

s2twp:不再將「高級」一律轉為「高階」(#1313) - #1509

Open
b84330808 wants to merge 1 commit into
BYVoid:masterfrom
b84330808:fix-1313-gaoji
Open

b84330808 wants to merge 1 commit into
BYVoid:masterfrom
b84330808:fix-1313-gaoji

Conversation

@b84330808

@b84330808 b84330808 commented Oct 15, 2026 •

Copy link
Copy Markdown

修正 #1313 中「高級 / 高階 / 進階」一項。

問題:TWPhrases.txt 的 高級 高階 進階 高級 會把所有「高級」轉成「高階」,例如 高级中学 → 高階中學、高级餐厅 → 高階餐廳。在臺灣,「高級」是通用形容詞,法規名稱即為《高級中等教育法》;「高階」「進階」只用於特定術語。

修改:

  • 將候選順序改為 高級 高級 高階 進階,s2twp 預設保留「高級」,反向對照仍完整(DictionaryReverseMappingTest)。
  • 保留既有術語 高級設置 → 進階設定、高級選項 → 進階選項,新增 高級語言 → 高階語言、高級搜索 → 進階搜尋,並在 TWPhrasesRev.txt 補上對應反向條目。
  • 新增 s2twp、tw2sp 測試案例。

依據:

已知影響:高级函数 由「高階函式」變為「高級函式」。大陸用法中「高級函數」常指 Excel 等的進階函數,語意不一,依「疑義從無」原則不另收錄。

測試:本機以官方 Python 套件載入修改後的文字詞典,模擬 s2twp、tw2sp 設定,跑 testcases.json 中全部相關案例:修改前新案例失敗,修改後 142/142 通過;詞典排序與正反向完整性亦已檢查。完整 Bazel 測試待 CI 確認。

本 PR 在 AI 工具(Claude Code)協助下撰寫;用字判斷由我(臺灣使用者)確認。

高級 is a general adjective in Taiwan (高級中學, 高級餐廳, 高級會員), so the
generic 高級 -> 高階 rule over-converts. Put the identity first so s2twp keeps
高級, and keep explicit Taiwan IT terms as phrases: 高級設置 -> 進階設定 and
高級選項 -> 進階選項 (existing), plus 高級語言 -> 高階語言 and
高級搜索 -> 進階搜尋. TWPhrasesRev gains the matching reverse entries.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant