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

开发版的「罕见字过滤」失效 #120

Closed
placeless opened this issue Aug 27, 2016 · 7 comments
Closed

开发版的「罕见字过滤」失效 #120

placeless opened this issue Aug 27, 2016 · 7 comments

Comments

@placeless
Copy link

编译的最新开发版鼠须管,发现无论是全拼还是双拼,「罕见字过滤」都不起作用了,未知同为开发版的用户,有没有遇到同样的问题?

# double_pinyin_flypy
patch:

  switches:
    - name: ascii_mode
      reset: 0
      states: ["中文", "西文"]
    - name: full_shape
      states: ["半角", "全角"]
    - name: extended_charset
      states: ["通用", "增廣"]
    - name: simplification
      reset: 1  # 增加這一行:默認啓用「繁→簡」轉換。
      states: ["漢字", "汉字"]
    - name: ascii_punct
      states: ["。,", ".,"]

  # translator/preedit_format: {}     # 输入双拼码的时候不转化为全拼码
  recognizer/patterns/reverse_lookup: # 关闭 ` 键反查功能

  # 启用罕见字過濾
  engine/filters:
    - simplifier
    - uniquifier
    - cjk_minifier
  translator/enable_charset_filter: true
@placeless
Copy link
Author

基本解决了我自己的问题。
之前,打 hakai 等拼音时,有许多问号出来,感觉「罕见字过滤」未起作用,后来做了两件事:

  1. translator/dictionary: luna_pinyin 改为了 translator/dictionary: pinyin_simp,减少不常用的单字。以 kai 为例,luna_pinyin 内含 86 个单字,其中 21 个显示不出来,表现为 号;而 pinyin_simp 只有 28 个,且默认(在 sublime text 内)都能正常显示。
  2. 做完第一步之后,还有个别文字在候选区显示为,比如 。于是又将 switches 的「繁→簡」转换,由 name: simplification 改为 name: zh_simp,,并且将 engine/filters:simplifier 改为 simplifier@zh_simp

最终的 patch 如下,不再用到 cjk_minifiertranslator/enable_charset_filter

# double_pinyin_flypy.custom.yaml, 只对小鹤双拼生效
patch:
  schema/dependencies:
  switches:
    - name: ascii_mode
      reset: 0
      states: ["中文", "西文"]
    - name: full_shape
      states: ["半角", "全角"]
    - name: zh_simp    # ※ 第二处
      reset: 1
      states: [ 漢字, 汉字 ]
    - name: ascii_punct
      states: ["。,", ".,"]

  engine/filters:
      - simplifier@zh_simp        # ※ 第二处
      - uniquifier
  translator/dictionary: pinyin_simp    # ※ 第一处

@osfans
Copy link

osfans commented Aug 27, 2016

新版可以支持過濾字符集

@osfans
Copy link

osfans commented Aug 27, 2016

具體參見:rime/librime#59

@placeless
Copy link
Author

@osfans 谢谢,字符集这个主意太赞了,还有,多谢你的示例。

@alswl
Copy link

alswl commented Jan 24, 2017

这会引入一个问题:如果使用非 UTF8 的字集,将导致 custom 里面定制的 Emoji 无法。

@ghost
Copy link

ghost commented Apr 23, 2017

所以cjk_minifier这个问题还能够修复吗

@songxing10000
Copy link

直接编辑文件wubi86.dict.yaml,不想输入的字全部干掉

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

No branches or pull requests

4 participants