Skip to content

Commit a847f54

Browse files
frankslinclaude
andauthored
Add Taiwan medical term conversions for three terms (#1023)
Added three medical term conversions for Taiwan Traditional Chinese: 1. 前列腺 ↔ 攝護腺 (prostate) 2. 抑鬱症 ↔ 憂鬱症 (depression) 3. 胰腺 ↔ 胰臟 (pancreas) Changes: - TWPhrases.txt: Added 3 entries for s2twp conversion (simplified → Taiwan Traditional with phrases) - TWPhrasesRev.txt: Added 3 reverse entries for tw2sp conversion (Taiwan Traditional → simplified with phrases) - testcases.json: Added 2 consolidated test cases covering all conversions Test cases verify proper conversion behavior: - medical_terms_tw_s2twp: Tests s2t, s2tw, s2twp conversions - medical_terms_tw_tw2sp: Tests tw2s, tw2sp, t2s conversions All dictionaries sorted using sort_all.py script. Co-authored-by: Claude <[email protected]>
1 parent 441d74c commit a847f54

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

data/dictionary/TWPhrases.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ U盤 隨身碟
8080
利比里亞 賴比瑞亞
8181
刷新 重新整理
8282
刻錄 燒錄
83+
前列腺 攝護腺
8384
前綴 字首
8485
剪切 剪下
8586
剪貼板 剪貼簿
@@ -201,6 +202,7 @@ U盤 隨身碟
201202
打印機 印表機
202203
打開 開啟 打開
203204
批量 批次
205+
抑鬱症 憂鬱症
204206
拋出 丟擲
205207
拷貝 複製
206208
持久性 永續性
@@ -387,6 +389,7 @@ U盤 隨身碟
387389
聲卡 音效卡
388390
聲明 宣告
389391
肯尼亞 肯亞
392+
胰腺 胰臟
390393
脫機 離線
391394
腳本 指令碼
392395
自動轉屏 自動旋轉螢幕

data/dictionary/TWPhrasesRev.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ SQL隱碼攻擊 SQL注入 SQL注入攻擊
200200
快捷半導體 仙童半導體
201201
快閃記憶體 閃存
202202
感測 傳感
203+
憂鬱症 抑鬱症
203204
截圖 截屏
204205
打開 打開
205206
批次 批量
@@ -220,6 +221,7 @@ SQL隱碼攻擊 SQL注入 SQL注入攻擊
220221
擴音 免提
221222
擷取 截取
222223
攜帶型 便攜式
224+
攝護腺 前列腺
223225
支持者 支持者
224226
支援 支持
225227
效能 性能
@@ -359,6 +361,7 @@ SQL隱碼攻擊 SQL注入 SQL注入攻擊
359361
聯結器 連接器
360362
聯絡 聯繫
361363
肯亞 肯尼亞
364+
胰臟 胰腺
362365
腳踏車 自行車
363366
自動旋轉螢幕 自動轉屏
364367
茅利塔尼亞 毛里塔尼亞

test/testcases/testcases.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,24 @@
428428
"tw2s": "辉达",
429429
"hk2s": "辉达"
430430
}
431+
},
432+
{
433+
"id": "medical_terms_tw_s2twp",
434+
"input": "前列腺癌、抑郁症、胰腺炎是常见疾病",
435+
"expected": {
436+
"s2t": "前列腺癌、抑鬱症、胰腺炎是常見疾病",
437+
"s2tw": "前列腺癌、抑鬱症、胰腺炎是常見疾病",
438+
"s2twp": "攝護腺癌、憂鬱症、胰臟炎是常見疾病"
439+
}
440+
},
441+
{
442+
"id": "medical_terms_tw_tw2sp",
443+
"input": "攝護腺、憂鬱症、胰臟的醫學術語",
444+
"expected": {
445+
"tw2s": "摄护腺、忧郁症、胰脏的医学术语",
446+
"tw2sp": "前列腺、抑郁症、胰腺的医学术语",
447+
"t2s": "摄护腺、忧郁症、胰脏的医学术语"
448+
}
431449
}
432450
]
433451
}

0 commit comments

Comments
 (0)