rime / rime-cantonese

Rime Cantonese input schema | 粵語拼音輸入方案
https://jyutping.net/
Creative Commons Attribution 4.0 International
551 stars 61 forks source link

Update OpenCC convert table #77

Closed sgalal closed 4 years ago

sgalal commented 4 years ago

因為俾好多用户投訴,呢個 pr 實現咗「打詞組出我哋推薦嘅香港寫法,打單字出全部異體字」,確保用户打單字嗰陣可以打出全部異體字。

效果:

pr demo


Code for generating HKVariantsFull.txt:

#!/usr/bin/env python3

from collections import defaultdict

d = defaultdict(dict)

with open('HKVariants.txt') as f:
    for line in f:
        k, vs = line.rstrip().split('\t')
        for v in vs.split(' '):
            d[k][v] = None
        d[k][k] = None

with open('HKVariantsFull.txt', 'w') as f:
    for k, vs in d.items():
        print(k + '\t' + ' '.join(vs), file=f)
sgalal commented 4 years ago

我建議保留 switches 四個選項,然後凈係將 t2hk 轉做 t2hkf 嚟確保相容性。(因爲可能真係有人用臺標都未定)

我諗住如果真係有人想用臺標,可以用單字打出嚟。另外我驚普通用户睇到咁多選項可能會理解錯:因為「臺標」唔係真係「台灣人就係噉用嘅」,同「港標」類似;「傳統漢字」唔係真係傳統嘅漢字,亦都唔係一個嚴格嘅體系。而且粵語拼音用户用臺標嘅機會好少,不如刪走佢,費事引起困惑。

tanxpyox commented 4 years ago

我諗住如果真係有人想用臺標,可以用單字打出嚟。另外我驚普通用户睇到咁多選項可能會理解錯:因為「臺標」唔係真係「台灣人就係噉用嘅」,同「港標」類似;「傳統漢字」唔係真係傳統嘅漢字,亦都唔係一個嚴格嘅體系。

嗯,有道理。噉不如上TG收集下意見,睇下佢哋想唔想噉改?

LEOYoon-Tsaw commented 4 years ago

但係如果係想打臺灣用字,噉改咗之後就淨得逐個逐個打,我覺得唔需改嗰4個選項。