Repository navigation
tw2sp:不再將「執行」一律轉為「運行」(#1313) - #1512
Merged
Merged
Conversation
執行 is the standard word in both Taiwan and Mainland usage for carrying out laws, orders, tasks and policies (強制執行, 執行判決, 執行任務), so the generic 執行 -> 運行 rule in TWPhrasesRev over-converts. Make the s2twp 運行 -> 執行 rule one-way, following the documented 信道 -> 通道 pattern: TWPhrases gains the self-mapping 執行 -> 執行, and TWPhrasesRev now maps 執行 -> 執行 運行 so tw2sp keeps 執行. 執行緒, 執行檔 and 執行長 keep their existing reverse conversions.
frankslin
reviewed
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修正 #1313 中「執行 / 運行」一項的 tw2sp 方向。
問題:
TWPhrasesRev.txt的執行 運行會把所有「執行」轉成「运行」,例如強制執行 → 强制运行、執行判決 → 运行判决、執行任務 → 运行任务、政策執行 → 政策运行。「執行」在兩岸都是依法實施、依計畫去做的通用詞,大陸法律用語同樣是「强制执行」「执行程序」;「運行」則指循軌跡運轉。修改:
AGENTS.md所述單向轉換的做法(信道 → 通道),在TWPhrases.txt加入自我對應執行 執行,並將TWPhrasesRev.txt改為執行 執行 運行:s2twp 的运行 → 執行不變,tw2sp 預設保留「執行」,反向對照仍完整。執行緒 → 线程、執行檔 → 可执行文件、執行長 → 首席执行官等既有詞組不受影響。tw2sp、s2twp測試案例。依據:
已知影響:tw2sp 中「執行程式」由「运行程序」變為「执行程序」,兩者在大陸皆通行。s2twp 方向的
运行 → 執行(如地球运行 → 地球執行)牽涉軟體語境的動詞用法,本 PR 不處理。測試:本機以 CMake 建置並執行
ctest(21/21 通過,含跑testcases.json的CommandLineConvertTest):修改前新 tw2sp 案例失敗,修改後通過。Bazel 專屬的詞典測試(排序/去重、正反向對照、分詞覆蓋等)以同一建置另行編譯執行,均通過;golden 測試與sort.py排序檢查亦通過。完整 Bazel 測試待 CI 確認。與 #1511 相互獨立,可分別審閱(兩者合併後測試亦通過)。
此變更使用 Claude Code 撰寫。