From 2c14a4221b44aadbedbbcaf880776910be8d6bcd Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 6 Jun 2024 17:28:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Revert=20"=E4=BF=AE=E5=A4=8D=E4=BD=A3?= =?UTF-8?q?=E9=87=91=E7=9A=84=E7=B9=81=E4=BD=93"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0abb637e8b9472c44e71dff0bc564c6151d659af. --- addition-dictionary/STCharacters.txt | 3 +-- addition-dictionary/STPhrases.txt | 3 +-- dictionary/HKPhrasesFinance.txt | 2 -- dictionary/STCharacters.txt | 4 +--- dictionary/STPhrases.txt | 3 +-- opencc_test.go | 5 ++--- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/addition-dictionary/STCharacters.txt b/addition-dictionary/STCharacters.txt index a14d957..162f533 100644 --- a/addition-dictionary/STCharacters.txt +++ b/addition-dictionary/STCharacters.txt @@ -1,2 +1 @@ -厘 厘 -佣 佣 \ 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/HKPhrasesFinance.txt b/dictionary/HKPhrasesFinance.txt index e8b3a47..e9f2508 100644 --- a/dictionary/HKPhrasesFinance.txt +++ b/dictionary/HKPhrasesFinance.txt @@ -86,5 +86,3 @@ 開户 開戶 開户 開戶 户 戶 -開户 開戶 -户 戶 diff --git a/dictionary/STCharacters.txt b/dictionary/STCharacters.txt index 4655e39..e1943bf 100644 --- a/dictionary/STCharacters.txt +++ b/dictionary/STCharacters.txt @@ -581,7 +581,6 @@ 峤 嶠 峥 崢 峦 巒 -峰 峯 崂 嶗 崃 崍 崄 嶮 @@ -3978,5 +3977,4 @@ 𰾄 鋂 𰾭 鑀 𱊜 𪈼 -厘 厘 -佣 佣 \ 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..6f0855d 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) } @@ -73,7 +73,6 @@ func TestSelfSpecialHotfix(t *testing.T) { cases := map[string]string{ "来自于汇丰,以及汇丰银行,汇入的款项": "來自於滙豐,以及滙豐銀行,匯入的款項", "汇业银行集团": "滙業銀行集團", - "佣金": "佣金", } assertCases(t, cc, cases) From da339ddee48fbd99a202e4a2a7a2fb7632adc709 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 6 Jun 2024 17:32:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20`=E5=85=8D=E4=BD=A3`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addition-dictionary/STCharacters.txt | 1 + dictionary/HKPhrasesFinance.txt | 2 ++ dictionary/STCharacters.txt | 2 ++ opencc_test.go | 2 ++ 4 files changed, 7 insertions(+) diff --git a/addition-dictionary/STCharacters.txt b/addition-dictionary/STCharacters.txt index 162f533..3ef9fb2 100644 --- a/addition-dictionary/STCharacters.txt +++ b/addition-dictionary/STCharacters.txt @@ -1 +1,2 @@ 厘 厘 +佣 佣 diff --git a/dictionary/HKPhrasesFinance.txt b/dictionary/HKPhrasesFinance.txt index e9f2508..e8b3a47 100644 --- a/dictionary/HKPhrasesFinance.txt +++ b/dictionary/HKPhrasesFinance.txt @@ -86,3 +86,5 @@ 開户 開戶 開户 開戶 户 戶 +開户 開戶 +户 戶 diff --git a/dictionary/STCharacters.txt b/dictionary/STCharacters.txt index e1943bf..b7aeb8d 100644 --- a/dictionary/STCharacters.txt +++ b/dictionary/STCharacters.txt @@ -581,6 +581,7 @@ 峤 嶠 峥 崢 峦 巒 +峰 峯 崂 嶗 崃 崍 崄 嶮 @@ -3978,3 +3979,4 @@ 𰾭 鑀 𱊜 𪈼 厘 厘 +佣 佣 diff --git a/opencc_test.go b/opencc_test.go index 6f0855d..4e2c35c 100644 --- a/opencc_test.go +++ b/opencc_test.go @@ -56,6 +56,7 @@ func TestConvert_s2hk_finance(t *testing.T) { "套利交易": "對沖", "下周开始公开配售": "下週開始公開招股", "户": "戶", + "免佣": "免佣", } s2hk, err := New("s2hk-finance") @@ -73,6 +74,7 @@ func TestSelfSpecialHotfix(t *testing.T) { cases := map[string]string{ "来自于汇丰,以及汇丰银行,汇入的款项": "來自於滙豐,以及滙豐銀行,匯入的款項", "汇业银行集团": "滙業銀行集團", + "免佣": "免佣", } assertCases(t, cc, cases)