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

【Feature Request】改进 script_translator 的多音节补全功能 #905

Closed
mirtlecn opened this issue Jun 28, 2024 · 3 comments
Closed

Comments

@mirtlecn
Copy link

Is your feature request related to a problem? Please describe.
rime/weasel#1168

Describe the solution you'd like

  • 提供对此功能的单独的开关(控制多音节补全,而不影响单音节补全)
  • 限制补全词的个数,防止多音节词挤满候选

Additional context

librime 新版对 script_translator 的 enable_completion 选项进行了破坏性的功能修改。该选项功能由控制单音节词补全,变成了同时控制单音节词和多音节词补全。

即:当 enable_completion 为 true 时:

  • 旧版:输入 ni'hao'shi'j -> 你好世界;为 false 时,输入 ni'hao'shi'j -> 无候选;
  • 新版:输入 ni'hao'shi'j -> 你好世界 你好世界啊;为 false 时,输入 ni'hao'shi'j -> 无候选

多音节补全无单独的功能开关。

此外,多音节补全行为似会造成困扰——会加载所有联想词,而非类似 macOS 预装输入法等那样,加载一两个联想词。问题在于,若有词条:

千与千寻
千与千寻作画
千与千寻原画
千与千寻采访
千与千寻观看

输入 qian'yu'qian'xun 后,特别像在搜索框中键入了一个关键词,弹出的各种莫名其妙的联想词。

如果有重码,或者要新造词,翻页数量过多。设想我有一个朋友的 id 是千千寻,我需要翻很多很多页。

macOS 预装输入法看起来之会加载其中一两个联想词。似乎是更好的选择

@ksqsf
Copy link
Member

ksqsf commented Jun 30, 2024

script_translator 产生的此类 candidate type 是 "completion",可以用 Lua 过滤。

@LEOYoon-Tsaw
Copy link
Member

臨時的辦法是取消補全,用拼寫算法生成縮寫

@fxliang
Copy link
Contributor

fxliang commented Jul 1, 2024

script_translator 产生的此类 candidate type 是 "completion",可以用 Lua 过滤。

要不然写个内置的filter😀

@lotem lotem closed this as completed in 0cdce16 Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants