From eec5c563bc3271ddc2d3a4438d798f560d4187a2 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 6 Jun 2024 17:33:36 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20`=E5=85=8D=E4=BD=A3`=20(#15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0abb637e8b9472c44e71dff0bc564c6151d659af. --- addition-dictionary/STCharacters.txt | 4 ++-- addition-dictionary/STPhrases.txt | 3 +-- dictionary/STCharacters.txt | 4 ++-- dictionary/STPhrases.txt | 3 +-- opencc_test.go | 7 ++++--- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/addition-dictionary/STCharacters.txt b/addition-dictionary/STCharacters.txt index a14d957..3ef9fb2 100644 --- a/addition-dictionary/STCharacters.txt +++ b/addition-dictionary/STCharacters.txt @@ -1,2 +1,2 @@ -厘 厘 -佣 佣 \ No newline at end of file +厘 厘 +佣 佣 diff --git a/addition-dictionary/STPhrases.txt b/addition-dictionary/STPhrases.txt index c88dbea..055bbdb 100644 --- a/addition-dictionary/STPhrases.txt +++ b/addition-dictionary/STPhrases.txt @@ -6,5 +6,4 @@ 公厘 公厘 厘米 厘米 汇总 匯總 -开户 開戶 -佣金 佣金 \ No newline at end of file +开户 開戶 \ No newline at end of file diff --git a/dictionary/STCharacters.txt b/dictionary/STCharacters.txt index 4655e39..b7aeb8d 100644 --- a/dictionary/STCharacters.txt +++ b/dictionary/STCharacters.txt @@ -3978,5 +3978,5 @@ 𰾄 鋂 𰾭 鑀 𱊜 𪈼 -厘 厘 -佣 佣 \ No newline at end of file +厘 厘 +佣 佣 diff --git a/dictionary/STPhrases.txt b/dictionary/STPhrases.txt index cacd7a9..c461cbd 100644 --- a/dictionary/STPhrases.txt +++ b/dictionary/STPhrases.txt @@ -49064,5 +49064,4 @@ 公厘 公厘 厘米 厘米 汇总 匯總 -开户 開戶 -佣金 佣金 \ No newline at end of file +开户 開戶 \ No newline at end of file diff --git a/opencc_test.go b/opencc_test.go index 6cef3b4..4e2c35c 100644 --- a/opencc_test.go +++ b/opencc_test.go @@ -5,11 +5,11 @@ import ( "testing" ) -func assertCases(t *testing.T, cc *OpenCC, cases map[string]string) { +func assertCases(t *testing.T, s2t *OpenCC, cases map[string]string) { t.Helper() for k, v := range cases { - str, err := cc.Convert(k) + str, err := s2t.Convert(k) if err != nil { t.Error(err) } @@ -56,6 +56,7 @@ func TestConvert_s2hk_finance(t *testing.T) { "套利交易": "對沖", "下周开始公开配售": "下週開始公開招股", "户": "戶", + "免佣": "免佣", } s2hk, err := New("s2hk-finance") @@ -73,7 +74,7 @@ func TestSelfSpecialHotfix(t *testing.T) { cases := map[string]string{ "来自于汇丰,以及汇丰银行,汇入的款项": "來自於滙豐,以及滙豐銀行,匯入的款項", "汇业银行集团": "滙業銀行集團", - "佣金": "佣金", + "免佣": "免佣", } assertCases(t, cc, cases)