From 89606a14b05c0381fc7f789a0e68e72848b6f499 Mon Sep 17 00:00:00 2001 From: Frank Lin Date: Sun, 4 Jan 2026 10:16:32 -0800 Subject: [PATCH] =?UTF-8?q?Fix(Dictionary):=20correct=20conversion=20for?= =?UTF-8?q?=20'Equation'=20(=E6=96=B9=E7=A8=8B=E5=BC=8F)=20in=20tw2sp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add '方程式' to TWPhrasesOther.txt to prevent '程式' -> '程序' misconversion - Add regression test case in testcases.json Ref: https://github.com/BYVoid/OpenCC/issues/714 --- data/dictionary/TWPhrasesOther.txt | 1 + test/testcases/testcases.json | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/data/dictionary/TWPhrasesOther.txt b/data/dictionary/TWPhrasesOther.txt index 9285daeb9..d0e6f68ef 100644 --- a/data/dictionary/TWPhrasesOther.txt +++ b/data/dictionary/TWPhrasesOther.txt @@ -9,6 +9,7 @@ 字節跳動 字節跳動 幾率 機率 摩爾線程 摩爾線程 +方程式 方程式 方便麪 泡麵 速食麵 李彥宏 李彥宏 概率 機率 diff --git a/test/testcases/testcases.json b/test/testcases/testcases.json index 98c0e3515..723f709a8 100755 --- a/test/testcases/testcases.json +++ b/test/testcases/testcases.json @@ -367,6 +367,14 @@ "expected": { "tw2t": "在廚房裏做手擀麪" } + }, + { + "id": "ByVoid_OpenCC_Issue714", + "input": "寫一個解算器程式來解決方程式", + "expected": { + "tw2sp": "写一个解算器程序来解决方程式", + "t2s": "写一个解算器程式来解决方程式" + } } ] -} +} \ No newline at end of file