Skip to content

Commit

Permalink
perf: 优化拼写速度
Browse files Browse the repository at this point in the history
- 移除小鹤拼音内的简拼正则,可以大幅度提升拼写速度;双拼也不需要简拼。
- 优化其他拼音输入法内的简拼,理论上比通配效率高一些
  • Loading branch information
Mintimate committed Mar 29, 2024
1 parent fd16f94 commit 4375746
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion double_pinyin_flypy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ speller:
delimiter: " `" # 第一位<空格>是拼音之间的分隔符;第二位<'>表示可以手动输入单引号来分割拼音。
algebra:
- erase/^xx$/
- abbrev/^([a-z]).+$/$1/ #简拼(首字母)
- derive/^([jqxy])u$/$1v/
- derive/^([aoe])([ioun])$/$1$1$2/
- xform/^([aoe])(ng)?$/$1$1$2/
Expand Down
2 changes: 0 additions & 2 deletions rime_mint.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ speller:
- derive/([aeiou])ng$/$1gn/ # dagn => dang
- derive/([dtngkhrzcs])o(u|ng)$/$1o/ # zho => zhong|zhou
- derive/ong$/on/ # zhonguo => zhong guo
- abbrev/^([a-z]).+$/$1/ #简拼(首字母)
- abbrev/^([zcs]h).+$/$1/ #简拼(zh, ch, sh)
### 自动纠错
# 有些规则对全拼简拼混输有副作用:如「x'ai 喜爱」被纠错为「xia 下」
# zh、ch、sh
Expand Down
2 changes: 1 addition & 1 deletion rime_mint_flypy.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ speller:
- derive/([aeiou])ng$/$1gn/ # dagn => dang
- derive/([dtngkhrzcs])o(u|ng)$/$1o/ # zho => zhong|zhou
- derive/ong$/on/ # zhonguo => zhong guo
- abbrev/^([a-z]).+$/$1/ #简拼(首字母)
- abbrev/^([a-z])[a-z]*$/$1/ # 简拼(首字母)
- abbrev/^([zcs]h).+$/$1/ #简拼(zh, ch, sh)
### 自动纠错
# 有些规则对全拼简拼混输有副作用:如「x'ai 喜爱」被纠错为「xia 下」
Expand Down
2 changes: 1 addition & 1 deletion terra_pinyin.custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ patch:
- derive/ong$/on/ # zhonguo => zhong guo
- derive/ao$/oa/ # hoa => hao
- derive/([iu])a(o|ng?)$/a$1$2/ # tain => tian
- abbrev/^([a-z]).+$/$1/
- abbrev/^([a-z])[a-z]*$/$1/ # 简拼(首字母)
- abbrev/^([zcs]h).+$/$1/
- derive/^([nl])ve/$1ue/
- derive/^([jqxy])u/$1v/
Expand Down

0 comments on commit 4375746

Please sign in to comment.