Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问明月拼音如何配置联想输入?目前我这边只能使用全拼输入 #319

Closed
truebit opened this issue Apr 30, 2019 · 5 comments
Labels

Comments

@truebit
Copy link

truebit commented Apr 30, 2019

如题,自己看了些配置文件,组装出来了一个简体版本的输入。
但是不能做联想输入:比如shenm自动出现“什么”,zaim出现“在么”这种

@lotem lotem added the invalid label Apr 30, 2019
@lotem
Copy link
Member

lotem commented Apr 30, 2019

根據描述,問題並非出現在原裝的朙月拼音輸入方案,而是未知的用戶自製方案。

朙月拼音的用法:從方案選單切換爲簡化字模式
https://github.com/rime/home/wiki/UserGuide#%E7%B9%81%E7%B0%A1%E5%AD%97%E5%88%87%E6%8F%9B

@lotem lotem closed this as completed Apr 30, 2019
@truebit
Copy link
Author

truebit commented Apr 30, 2019

感谢回复。请问具体是哪个选项控制联想效果的呢?

@truebit
Copy link
Author

truebit commented Apr 30, 2019

这是我的配置方案:

patch:
  schema/dependencies: {}
  schema/name: 明月拼音·简体
  switches:
    - name: ascii_mode
      reset: 0
      states: [ 中文, 西文 ]
    - name: emoji_suggestion
      reset: 1
      states: [ "🈚️️\uFE0E", "🈶️️\uFE0F" ]
    - name: full_shape
      states: [ 半角, 全角 ]
    - name: zh_simp
      reset: 1
      states: [ 漢字, 汉字 ]
    - name: ascii_punct
      states: [ 。,, ., ]
  emoji_suggestion:
    opencc_config: emoji.json
    option_name: emoji_suggestion
  # engine/translators:
  #   - punct_translator
  #   - script_translator
  engine/filters:
    - simplifier
    - simplifier@emoji_suggestion
    - uniquifier
  reverse_lookup:
    dictionary: stroke
    enable_completion: true
    prefix: "`"
    suffix: "'"
    tips: 〔筆畫〕
    preedit_format:
      - xlit/hspnz/一丨丿丶乙/
    comment_format:
      - xform/([nl])v/$1ü/
  punctuator:
    import_preset: symbols
  recognizer:
    import_preset: default
    patterns:
      punct: "^/([a-z]+|[0-9]0?)$"
      html: "^<[a-z]+>$"
      camel: "[a-z]+[A-Z].*$"
      url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]{1,11}[.:_-].*$"
  speller/algebra:
    - "erase/^xx$/"
    # 設置模糊音
    - "derive/^([nl])ve$/$1ue/"
    - "derive/[zg]([iv])/j$1/"
    - "derive/[ck]([iv])/q$1/"
    - "derive/[sh]([iv])/x$1/"
    - "derive/^([jqxy])v/$1u/"
    - "derive/([zcs]h|r)ii$/$1i/"
    - "derive/m$/n/"
    - "derive/ia([mn])$/ie$1/"
    - "derive/([bpmfw])ong/$1eng/"
    - "derive/un$/uen/"
    - "derive/ui$/uei/"
    - "derive/iu$/iou/"
    # 纠错
    - "derive/([aeiou])ng$/$1gn/"
    - "derive/([dtngkhrzcs])o(u|ng)$/$1o/"
    - "derive/ong$/on/"
    - "derive/ao$/oa/"
    - "derive/([iu])a([ou]|ng?)$/a$1$2/"
    # 简拼
    - abbrev/^([a-z]).+$/$1/
    - abbrev/^([zcs]h).+$/$1/
  ## 词典
  translator:
    dictionary: luna_pinyin.extended
    prism: luna_pinyin_simp
    # enable_correction: true
  
  custom_phrase:
    dictionary: ""
    user_dict: custom_phrase
    db_class: stabledb
    enable_completion: false
    enable_sentence: false
    initial_quality: 1

@AnLuoRidge
Copy link

AnLuoRidge commented Sep 10, 2019

speller/algebra前加入这一条即可:"speller/algebra/@before 1": xform/^([b-df-hj-np-tv-z])$/$1_/

代码含义:
speller:拼写处理器,接受字符按键,编辑输入。
algebra:拼写运算规则,由之算出的拼写汇入 prism 中。
xform:--改写〔不保留原形〕。
b-d, f-h 等用来匹配键入的声母。
$1_:声母+任意韵母。

参考:rime方案製作詳解


此外,这个问题的描述不准确。

可以改写为:如何让 RIME 在全拼或双拼模式下支持简拼?即只需要声母就可以联想。
二级问题是:控制联想的配置条目是什么?

相关链接:
Github上的镜像 issue
V2EX上的镜像问题

@aaron2wh
Copy link

如题,自己看了些配置文件,组装出来了一个简体版本的输入。
但是不能做联想输入:比如shenm自动出现“什么”,zaim出现“在么”这种
我也出現過你這樣的問題。經過實驗,我發現,其實明月官方是默認是支持你所說的缺省韻母功能的。但是如果你加入了英文字典或者中英混輸方案就好出現你說的這種情況出現。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants