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

feat(kaomoji): 添加opencc转换的颜文字 #920

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ switcher:
- emoji
- full_shape
- search_single_char
- kaomoji
fold_options: true # 呼出时是否折叠,多方案时建议折叠 true ,一个方案建议展开 false
abbreviate_options: true # 折叠时是否缩写选项
option_list_separator: ' / ' # 折叠时的选项分隔符
Expand Down
9 changes: 9 additions & 0 deletions double_pinyin.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ switches:
- name: emoji
states: [ 💀, 😄 ]
reset: 1
- name: kaomoji
states: [  ̄へ ̄, (u‿ฺu✿ฺ) ]
reset: 1
- name: full_shape
states: [ 半角, 全角 ]
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
Expand Down Expand Up @@ -87,6 +90,7 @@ engine:
- lua_filter@pin_cand_filter # 置顶候选项(顺序要求:置顶候选项 > Emoji > 简繁切换)
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- simplifier@emoji # Emoji
- simplifier@kaomoji # kaomoji 颜文字
- simplifier@traditionalize # 简繁切换
- lua_filter@search@radical_pinyin # 部件拆字辅码
- uniquifier # 去重
Expand Down Expand Up @@ -238,6 +242,11 @@ emoji:
opencc_config: emoji.json
inherit_comment: false # 在 corrector.lua 及反查中,emoji 返回空注释

# kaomoji 颜文字
kaomoji:
option_name: kaomoji
opencc_config: kaomoji.json
inherit_comment: false # 在 corrector.lua 及反查中,kaomoji 返回空注释

# 简繁切换
traditionalize:
Expand Down
9 changes: 9 additions & 0 deletions double_pinyin_abc.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ switches:
- name: emoji
states: [ 💀, 😄 ]
reset: 1
- name: kaomoji
states: [  ̄へ ̄, (u‿ฺu✿ฺ) ]
reset: 1
- name: full_shape
states: [ 半角, 全角 ]
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
Expand Down Expand Up @@ -87,6 +90,7 @@ engine:
- lua_filter@pin_cand_filter # 置顶候选项(顺序要求:置顶候选项 > Emoji > 简繁切换)
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- simplifier@emoji # Emoji
- simplifier@kaomoji # kaomoji 颜文字
- simplifier@traditionalize # 简繁切换
- lua_filter@search@radical_pinyin # 部件拆字辅码
- uniquifier # 去重
Expand Down Expand Up @@ -241,6 +245,11 @@ emoji:
opencc_config: emoji.json
inherit_comment: false # 在 corrector.lua 及反查中,emoji 返回空注释

# kaomoji 颜文字
kaomoji:
option_name: kaomoji
opencc_config: kaomoji.json
inherit_comment: false # 在 corrector.lua 及反查中,kaomoji 返回空注释

# 简繁切换
traditionalize:
Expand Down
9 changes: 9 additions & 0 deletions double_pinyin_flypy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ switches:
- name: emoji
states: [ 💀, 😄 ]
reset: 1
- name: kaomoji
states: [  ̄へ ̄, (u‿ฺu✿ฺ) ]
reset: 1
- name: full_shape
states: [ 半角, 全角 ]
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
Expand Down Expand Up @@ -87,6 +90,7 @@ engine:
- lua_filter@pin_cand_filter # 置顶候选项(顺序要求:置顶候选项 > Emoji > 简繁切换)
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- simplifier@emoji # Emoji
- simplifier@kaomoji # kaomoji 颜文字
- simplifier@traditionalize # 简繁切换
- lua_filter@search@radical_pinyin # 部件拆字辅码
- uniquifier # 去重
Expand Down Expand Up @@ -238,6 +242,11 @@ emoji:
opencc_config: emoji.json
inherit_comment: false # 在 corrector.lua 及反查中,emoji 返回空注释

# kaomoji 颜文字
kaomoji:
option_name: kaomoji
opencc_config: kaomoji.json
inherit_comment: false # 在 corrector.lua 及反查中,kaomoji 返回空注释

# 简繁切换
traditionalize:
Expand Down
9 changes: 9 additions & 0 deletions double_pinyin_mspy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ switches:
- name: emoji
states: [ 💀, 😄 ]
reset: 1
- name: kaomoji
states: [  ̄へ ̄, (u‿ฺu✿ฺ) ]
reset: 1
- name: full_shape
states: [ 半角, 全角 ]
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
Expand Down Expand Up @@ -87,6 +90,7 @@ engine:
- lua_filter@pin_cand_filter # 置顶候选项(顺序要求:置顶候选项 > Emoji > 简繁切换)
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- simplifier@emoji # Emoji
- simplifier@kaomoji # kaomoji 颜文字
- simplifier@traditionalize # 简繁切换
- lua_filter@search@radical_pinyin # 部件拆字辅码
- uniquifier # 去重
Expand Down Expand Up @@ -242,6 +246,11 @@ emoji:
opencc_config: emoji.json
inherit_comment: false # 在 corrector.lua 及反查中,emoji 返回空注释

# kaomoji 颜文字
kaomoji:
option_name: kaomoji
opencc_config: kaomoji.json
inherit_comment: false # 在 corrector.lua 及反查中,kaomoji 返回空注释

# 简繁切换
traditionalize:
Expand Down
9 changes: 9 additions & 0 deletions double_pinyin_sogou.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ switches:
- name: emoji
states: [ 💀, 😄 ]
reset: 1
- name: kaomoji
states: [  ̄へ ̄, (u‿ฺu✿ฺ) ]
reset: 1
- name: full_shape
states: [ 半角, 全角 ]
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
Expand Down Expand Up @@ -87,6 +90,7 @@ engine:
- lua_filter@pin_cand_filter # 置顶候选项(顺序要求:置顶候选项 > Emoji > 简繁切换)
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- simplifier@emoji # Emoji
- simplifier@kaomoji # kaomoji 颜文字
- simplifier@traditionalize # 简繁切换
- lua_filter@search@radical_pinyin # 部件拆字辅码
- uniquifier # 去重
Expand Down Expand Up @@ -242,6 +246,11 @@ emoji:
opencc_config: emoji.json
inherit_comment: false # 在 corrector.lua 及反查中,emoji 返回空注释

# kaomoji 颜文字
kaomoji:
option_name: kaomoji
opencc_config: kaomoji.json
inherit_comment: false # 在 corrector.lua 及反查中,kaomoji 返回空注释

# 简繁切换
traditionalize:
Expand Down
9 changes: 9 additions & 0 deletions double_pinyin_ziguang.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ switches:
- name: emoji
states: [ 💀, 😄 ]
reset: 1
- name: kaomoji
states: [  ̄へ ̄, (u‿ฺu✿ฺ) ]
reset: 1
- name: full_shape
states: [ 半角, 全角 ]
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
Expand Down Expand Up @@ -87,6 +90,7 @@ engine:
- lua_filter@pin_cand_filter # 置顶候选项(顺序要求:置顶候选项 > Emoji > 简繁切换)
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- simplifier@emoji # Emoji
- simplifier@kaomoji # kaomoji 颜文字
- simplifier@traditionalize # 简繁切换
- lua_filter@search@radical_pinyin # 部件拆字辅码
- uniquifier # 去重
Expand Down Expand Up @@ -240,6 +244,11 @@ emoji:
opencc_config: emoji.json
inherit_comment: false # 在 corrector.lua 及反查中,emoji 返回空注释

# kaomoji 颜文字
kaomoji:
option_name: kaomoji
opencc_config: kaomoji.json
inherit_comment: false # 在 corrector.lua 及反查中,kaomoji 返回空注释

# 简繁切换
traditionalize:
Expand Down
19 changes: 19 additions & 0 deletions opencc/kaomoji.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Chinese to Kaomoji",
"segmentation": {
"type": "mmseg",
"dict": {
"type": "text",
"file": "kaomoji.txt"
}
},
"conversion_chain": [
{
"dict": {
"type": "text",
"file": "kaomoji.txt"

}
}
]
}
Loading