Skip to content

Commit

Permalink
feat: 小鹤双拼辅码滤镜提示
Browse files Browse the repository at this point in the history
添加小鹤双拼的辅码滤镜,方便小鹤用户看到形码提示。
默认关闭,可以在存在候选词情况下,使用「Control + Shift + C 」进行激活

Co-Authored-By: GGboxCloud <140216532+ggboxcloud@users.noreply.github.com>
  • Loading branch information
Mintimate and GGboxCloud committed Mar 16, 2024
1 parent 40e535a commit 5fdc271
Show file tree
Hide file tree
Showing 3 changed files with 6,975 additions and 1 deletion.
19 changes: 18 additions & 1 deletion double_pinyin_flypy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ key_binder:
- {accept: "Control+Shift+E", toggle: emoji_suggestion, when: always}
- {accept: "Control+Shift+exclam", toggle: transcription, when: has_menu}
- {accept: "Control+Shift+1", toggle: transcription, when: has_menu}
- {accept: "Control+Shift+C", toggle: chaifen, when: has_menu} # 拆字滤镜开关
- {accept: minus, send: Page_Up, when: paging} # 使用`-`进行向上翻页(第一页时候无效)
- {accept: equal, send: Page_Down, when: has_menu} # 使用`=`进行向下翻页

Expand All @@ -49,6 +50,8 @@ switches:
states: [ 简体 , 繁体 ]
- name: ascii_punct
states: [ 。,, ., ]
- name: chaifen # 拆字滤镜
states: [ 🙈, 🐵 ] # 快捷键 「Control+Shift+C」

engine:
processors:
Expand Down Expand Up @@ -88,8 +91,9 @@ engine:
- lua_filter@*corrector_filter # 错音错字提示
- lua_filter@*autocap_filter # 英文自动大写
- simplifier@emoji_suggestion
- lua_filter@*auxCode_filter@flypy_full # 小鹤双拼辅码(音形)
- simplifier@transcription_cc
- simplifier@chaifen_cc # 鹤形拆字辅助滤镜
- lua_filter@*auxCode_filter@flypy_full # 小鹤双拼辅码(音形)
- lua_filter@*reduce_english_filter # 降低部分英语单词在候选项的位置
- uniquifier # 去重

Expand All @@ -107,6 +111,19 @@ emoji_suggestion:
option_name: emoji_suggestion
tips: all
inherit_comment: false

# 鹤形拆字辅助滤镜
chaifen_cc:
opencc_config: fly_Chaifen.json
option_name: chaifen
show_in_comment: true # 是否仅将转换结果显示在备注中
comment_format:
- "xform/&nbsp;/ /"
tags: # 设置其作用范围
- abc
- storkfly
- reverse_lookup
tips: char # 单字加滤镜: char; 全部: all,

# 最大输入长度
codeLengthLimit_processor: 25
Expand Down
16 changes: 16 additions & 0 deletions opencc/fly_Chaifen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "fly_Chaifen",
"segmentation": {
"type": "mmseg",
"dict": {
"type": "text",
"file": "fly_Chaifen.txt"
}
},
"conversion_chain": [{
"dict": {
"type": "text",
"file": "fly_Chaifen.txt"
}
}]
}
Loading

0 comments on commit 5fdc271

Please sign in to comment.