Skip to content

Commit

Permalink
refactor: pin_cand.filter.lua fix iDvel#675
Browse files Browse the repository at this point in the history
- 修改错误的判断逻辑
- 调整了方案中 engine/filters 的排序,自适应简繁
- 不再需要在配置中写 emoji,emoji 将自动吸附
- 解决 M.pin_cands 在方案间的串台问题(改成 env.pin_cands)
  • Loading branch information
iDvel committed Feb 8, 2024
1 parent efcb4e2 commit dacea2c
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 164 deletions.
4 changes: 2 additions & 2 deletions double_pinyin.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ engine:
- lua_translator@force_gc # 暴力 GC
filters:
- lua_filter@corrector # 错音错字提示
- lua_filter@pin_cand_filter # 置顶候选项
- simplifier@emoji # Emoji
- simplifier@traditionalize # 简繁切换
- reverse_lookup_filter@radical_reverse_lookup # 部件拆字滤镜
- lua_filter@search@radical_pinyin # 部件拆字辅码
- lua_filter@autocap_filter # 英文自动大写
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- lua_filter@pin_cand_filter # 置顶候选项
- uniquifier # 去重


Expand Down Expand Up @@ -153,7 +153,7 @@ reduce_english_filter:


# Lua 配置: 置顶候选项
# 请参考 rime_ice.schema.yaml 中的注释
# 注释太长了,请参考 pin_cand_filter.lua 开头的说明书。
pin_cand_filter:
# 格式:编码<Tab>字词1<Space>字词2……
- d 的
Expand Down
4 changes: 2 additions & 2 deletions double_pinyin_abc.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ engine:
- lua_translator@force_gc # 暴力 GC
filters:
- lua_filter@corrector # 错音错字提示
- lua_filter@pin_cand_filter # 置顶候选项
- simplifier@emoji # Emoji
- simplifier@traditionalize # 简繁切换
- reverse_lookup_filter@radical_reverse_lookup # 部件拆字滤镜
- lua_filter@search@radical_pinyin # 部件拆字辅码
- lua_filter@autocap_filter # 英文自动大写
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- lua_filter@pin_cand_filter # 置顶候选项
- uniquifier # 去重


Expand Down Expand Up @@ -153,7 +153,7 @@ reduce_english_filter:


# Lua 配置: 置顶候选项
# 请参考 rime_ice.schema.yaml 中的注释
# 注释太长了,请参考 pin_cand_filter.lua 开头的说明书。
pin_cand_filter:
# 格式:编码<Tab>字词1<Space>字词2……
- d 的
Expand Down
4 changes: 2 additions & 2 deletions double_pinyin_flypy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ engine:
- lua_translator@force_gc # 暴力 GC
filters:
- lua_filter@corrector # 错音错字提示
- lua_filter@pin_cand_filter # 置顶候选项
- simplifier@emoji # Emoji
- simplifier@traditionalize # 简繁切换
- reverse_lookup_filter@radical_reverse_lookup # 部件拆字滤镜
- lua_filter@search@radical_pinyin # 部件拆字辅码
- lua_filter@autocap_filter # 英文自动大写
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- lua_filter@pin_cand_filter # 置顶候选项
- uniquifier # 去重


Expand Down Expand Up @@ -153,7 +153,7 @@ reduce_english_filter:


# Lua 配置: 置顶候选项
# 请参考 rime_ice.schema.yaml 中的注释
# 注释太长了,请参考 pin_cand_filter.lua 开头的说明书。
pin_cand_filter:
# 格式:编码<Tab>字词1<Space>字词2……
- d 的
Expand Down
4 changes: 2 additions & 2 deletions double_pinyin_mspy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ engine:
- lua_translator@force_gc # 暴力 GC
filters:
- lua_filter@corrector # 错音错字提示
- lua_filter@pin_cand_filter # 置顶候选项
- simplifier@emoji # Emoji
- simplifier@traditionalize # 简繁切换
- reverse_lookup_filter@radical_reverse_lookup # 部件拆字滤镜
- lua_filter@search@radical_pinyin # 部件拆字辅码
- lua_filter@autocap_filter # 英文自动大写
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- lua_filter@pin_cand_filter # 置顶候选项
- uniquifier # 去重


Expand Down Expand Up @@ -153,7 +153,7 @@ reduce_english_filter:


# Lua 配置: 置顶候选项
# 请参考 rime_ice.schema.yaml 中的注释
# 注释太长了,请参考 pin_cand_filter.lua 开头的说明书。
pin_cand_filter:
# 格式:编码<Tab>字词1<Space>字词2……
- d 的
Expand Down
4 changes: 2 additions & 2 deletions double_pinyin_sogou.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ engine:
- lua_translator@force_gc # 暴力 GC
filters:
- lua_filter@corrector # 错音错字提示
- lua_filter@pin_cand_filter # 置顶候选项
- simplifier@emoji # Emoji
- simplifier@traditionalize # 简繁切换
- reverse_lookup_filter@radical_reverse_lookup # 部件拆字滤镜
- lua_filter@search@radical_pinyin # 部件拆字辅码
- lua_filter@autocap_filter # 英文自动大写
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- lua_filter@pin_cand_filter # 置顶候选项
- uniquifier # 去重


Expand Down Expand Up @@ -153,7 +153,7 @@ reduce_english_filter:


# Lua 配置: 置顶候选项
# 请参考 rime_ice.schema.yaml 中的注释
# 注释太长了,请参考 pin_cand_filter.lua 开头的说明书。
pin_cand_filter:
# 格式:编码<Tab>字词1<Space>字词2……
- d 的
Expand Down
4 changes: 2 additions & 2 deletions double_pinyin_ziguang.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ engine:
- lua_translator@force_gc # 暴力 GC
filters:
- lua_filter@corrector # 错音错字提示
- lua_filter@pin_cand_filter # 置顶候选项
- simplifier@emoji # Emoji
- simplifier@traditionalize # 简繁切换
- reverse_lookup_filter@radical_reverse_lookup # 部件拆字滤镜
- lua_filter@search@radical_pinyin # 部件拆字辅码
- lua_filter@autocap_filter # 英文自动大写
- lua_filter@reduce_english_filter # 降低部分英语单词在候选项的位置
- lua_filter@pin_cand_filter # 置顶候选项
- uniquifier # 去重


Expand Down Expand Up @@ -153,7 +153,7 @@ reduce_english_filter:


# Lua 配置: 置顶候选项
# 请参考 rime_ice.schema.yaml 中的注释
# 注释太长了,请参考 pin_cand_filter.lua 开头的说明书。
pin_cand_filter:
# 格式:编码<Tab>字词1<Space>字词2……
- d 的
Expand Down
Loading

0 comments on commit dacea2c

Please sign in to comment.