rime / home

Rime::Home is home to Rime users and developers
https://rime.im
4.28k stars 231 forks source link

无法使用模糊音设置? #1425

Closed hwypengsir closed 11 months ago

hwypengsir commented 11 months ago

系统:

uname -a
Linux debian 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64 GNU/Linux

我的设置

cat   ~/.local/share/fcitx5/rime/default.custom.yaml
patch:
  menu:
    page_size: 10    
  'speller/algebra': 
    - erase/^xx$/
    - derive/^([zcs])h/$1/ # zh, ch, sh => z, c, s
    - derive/^([zcs])([^h])/$1h$2/ # z, c, s => zh, ch, sh
    - derive/([aei])n$/$1ng/ # en => eng, in => ing
    - derive/([aei])ng$/$1n/ # eng => en, ing => in
    - derive/([iu])an$/$lang/ # ian => iang, uan => uang
    - derive/([iu])ang$/$lan/ # iang => ian, uang => uan
    - derive/([aeiou])ng$/$1gn/        # dagn => dang
    - derive/([dtngkhrzcs])o(u|ng)$/$1o/  # zho => zhong|zhou
    - derive/ong$/on/                  # zhonguo => zhong guo
    - derive/ao$/oa/                   # hoa => hao
    - derive/([iu])a(o|ng?)$/a$1$2/    # tain => tian
    - abbrev/^([a-z]).+$/$1/ #简拼(首字母)
    - abbrev/^([zcs]h).+$/$1/ #简拼(zh, ch, sh)

为何模糊音设置不起作用? 知道必须输入 zhidao 输入zidao ,无法调出来!

lotem commented 11 months ago

Rime 裏面一種具體的輸入法叫做「輸入方案」。

模糊音設置是針對拼音輸入的,全局設置無效。 因此需要給「朙月拼音」這個輸入方案打補丁,補丁文件是 luna_pinyin.custom.yaml

hwypengsir commented 11 months ago

这是我的配置文件内容

cat luna_pinyin.custom.yaml
patch:
  'speller/algebra':
    - erase/^xx$/                      # 第一行保留

    - derive/^([zcs])h/$1/             # zh, ch, sh => z, c, s
    - derive/^([zcs])([^h])/$1h$2/     # z, c, s => zh, ch, sh

    - derive/([ei])n$/$1ng/            # en => eng, in => ing
    - derive/([ei])ng$/$1n/            # eng => en, ing => in

    # 模糊音定義先於簡拼定義,方可令簡拼支持以上模糊音
    - abbrev/^([a-z]).+$/$1/           # 簡拼(首字母)
    - abbrev/^([zcs]h).+$/$1/          # 簡拼(zh, ch, sh)

放在 $HOME/config/fcitx5/rime/ 和 $HOME/.local/share/fcitx5/rime/ 中,都不起作用,为何?