rime / home

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

自代的倉頡五代能有萬用字符? #1612

Open snakewa opened 2 months ago

snakewa commented 2 months ago

找了很久也不知道能不能設定。十多年用了系統自帶的,主要用三代(己經懂得加三代擴展)

有時侯真得打不出來,想用萬用字符*或?

主要有一些不常字,寫也忘了如何寫, 例如: 薦 “甘戈難火” 輸入 “甘戈*火” 或 “甘*難火” 或 “甘*火” 能在侯選字中查出來

leafpool243 commented 1 month ago

https://github.com/rime/rime-cangjie/issues/13 這裡有人說沒辦法,可是行列輸入法(rime-array)就有萬用字符

行列的「我」是lox,可以打l?x來輸入「我」,而且還會顯示正確的打法 圖片

ksqsf commented 1 month ago

可以實現。思路是使用 spelling algebra 生成帶萬用符的拼寫。正確打法提示可用 spelling_hints。

leafpool243 commented 1 month ago

array30_query.schema.yaml 有一堆 regex, 但我完全看不懂

speller:
  alphabet: "abcdefghjiklmnopqrstuvwxyz;,./?"
  delimiter: "'"
  algebra:
    - xform/^(.*)!$/$1/                 # 簡碼
    - xform/^(.*)@$/$1/                 # 特別碼(須置於簡碼之後)
    # "?"萬用字元
    - derive/^([^?])([^?])?([^?])?[^?](i)?$/$1$2$3\?$4/   # .(.)(.)?(i)
    - derive/^([^?])([^?])[^?]([^?])(i)?$/$1$2\?$3$4/     # ..?.(i)
    - derive/^([^?])([^?])?[^?][^?](i)?$/$1$2\?\?$3/      # .(.)??(i)
    - derive/^([^?])[^?]([^?])([^?])?(i)?$/$1\?$2$3$4/    # .?.(.)(i)
    - derive/^([^?])[^?]([^?])[^?](i)?$/$1\?$2\?$3/       # .?.?(i)
    - derive/^([^?])[^?][^?]([^?])(i)?$/$1\?\?$2$3/       # .??.(i)
    - derive/^([^?])[^?][^?][^?](i)?$/$1\?\?\?$2/         # .???(i)
    - derive/^[^?]([^?])([^?])?([^?])?(i)?$/\?$1$2$3$4/   # ?.(.)(.)(i)
    - derive/^[^?]([^?])([^?])?[^?](i)?$/\?$1$2\?$3/      # ?.(.)?(i)
    - derive/^[^?]([^?])[^?]([^?])(i)?$/\?$1\?$2$3/       # ?.?.(i)
    - derive/^[^?]([^?])[^?][^?](i)?$/\?$1\?\?$2/         # ?.??(i)
    - derive/^[^?][^?]([^?])([^?])?(i)?$/\?\?$1$2$3/      # ??.(.)(i)
    - derive/^[^?][^?]([^?])[^?](i)?$/\?\?$1\?$2/         # ??.?(i)
    - derive/^[^?][^?][^?]([^?])(i)?$/\?\?\?$1$2/         # ???.(i)

可是我還是不懂它是如何知道array_query這個方案要用來做這件事

leafpool243 commented 1 month ago

我以為看一下行列是怎麽做的就可以模仿,結果沒那麼容易 🤣