Skip to content

Add macro (巨集) terminology to TWPhrases for s2twp/tw2sp#1089

Merged
frankslin merged 1 commit intomasterfrom
copilot/add-s2twp-tw2sp-macro-conversions
Apr 6, 2026
Merged

Add macro (巨集) terminology to TWPhrases for s2twp/tw2sp#1089
frankslin merged 1 commit intomasterfrom
copilot/add-s2twp-tw2sp-macro-conversions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

Adds 10 macro-related computing term conversions between simplified Chinese and Taiwan traditional Chinese (e.g., 宏定义↔巨集定義, 宏函数↔巨集函式, 宏编程↔巨集程式設計).

Dictionary entries

  • TWPhrases.txt: 10 new standard-traditional → Taiwan-traditional mappings (宏定義→巨集定義, etc.)
  • TWPhrasesRev.txt: 10 corresponding reverse mappings
  • STPhrases.txt: Added 宏处理→宏處理 to fix a segmentation issue — 处理 already exists in STPhrases, causing mmseg to segment 宏处理 as ["宏", "处理"], which prevents the TWPhrases conversion step from matching the compound 宏處理

Test cases

  • testcases.json: Added macro_terms_s2twp and macro_terms_tw2sp covering all 10 terms in both directions

All dictionaries sorted via sort.py.

… test cases

Added 10 macro-related simplified-traditional (Taiwan) phrase conversions:
- 宏定义↔巨集定義, 宏展开↔巨集展開, 宏调用↔巨集呼叫
- 宏替换↔巨集替換, 宏命令↔巨集命令, 宏语言↔巨集語言
- 宏处理↔巨集處理, 宏函数↔巨集函式, 宏指令↔巨集指令
- 宏编程↔巨集程式設計

Also added 宏处理 to STPhrases.txt to fix mmseg segmentation issue
(处理 in STPhrases was causing 宏处理 to be split into separate segments).

Agent-Logs-Url: https://github.com/BYVoid/OpenCC/sessions/b17be723-3507-4574-bdeb-578e9da8ba59

Co-authored-by: frankslin <748873+frankslin@users.noreply.github.com>
@frankslin
Copy link
Copy Markdown
Collaborator

This PR addresses part of #1042.

@frankslin frankslin merged commit 3bc855e into master Apr 6, 2026
34 checks passed
@frankslin frankslin deleted the copilot/add-s2twp-tw2sp-macro-conversions branch April 6, 2026 02:55
@frankslin frankslin mentioned this pull request Apr 16, 2026
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.

2 participants