LawssssCat / rime-aurora

电脑 rime 极光方案(朙月拼音)
MIT License
37 stars 6 forks source link

英文输入支持通配符 * #15

Open aurora19840231 opened 2 years ago

aurora19840231 commented 2 years ago

如: beau*ful => beautiful

参考: https://github.com/shewer/rime-english/blob/b361732805192c73baafc2b8d00e68fe843d269d/english_dict.lua

aurora19840231 commented 2 years ago

基本功能实现了,但是存在性能问题:

前缀只有一个字符时,如:"s*ful" 时,将基本遍历整个字典且进行字符串匹配;

解决(临时方法):

上述情况仅加载固定数量字典数据

https://github.com/LawssssCat/rime-aurora/blob/d74d3be71ae31f7b8254914d10599a0c5597cbae/patch/my_easy_en.yaml#L21

https://github.com/LawssssCat/rime-aurora/blob/d74d3be71ae31f7b8254914d10599a0c5597cbae/lua/my_easy_en.lua#L149

https://github.com/LawssssCat/rime-aurora/blob/d74d3be71ae31f7b8254914d10599a0c5597cbae/lua/my_easy_en.lua#L81-L84