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

[BUG] 搜索功能不支持英文单词的部分搜索 #5928

Open
2 tasks done
cn-Mouxy opened this issue Oct 10, 2024 · 2 comments
Open
2 tasks done

[BUG] 搜索功能不支持英文单词的部分搜索 #5928

cn-Mouxy opened this issue Oct 10, 2024 · 2 comments
Labels

Comments

@cn-Mouxy
Copy link
Contributor

请选择:

  • 我已经读过了 F.A.Q.,进行了搜索,但没有得到答案
  • 我正在着手修复这个问题

我遇到了这样的问题

当搜索输入的内容是英文时,需输入单词全拼才可以搜索的到内容,例如在搜索框中输入“manache”搜索不到内容,需输入“manacher”全拼才可以,个人觉得这十分影响英文内容搜索效率。
屏幕截图 2024-10-10 181506
屏幕截图 2024-10-10 181435

我确认这个问题可以这样复现

No response

@cn-Mouxy cn-Mouxy added the Other Bug / 内容无关的 Bug 内容无关的 bug label Oct 10, 2024
Copy link

welcome bot commented Oct 10, 2024

感谢你对 OI Wiki 的关注!记得在 Issue 中表达清楚自己的意思哦~

@cn-Mouxy cn-Mouxy reopened this Oct 10, 2024
@cn-Mouxy
Copy link
Contributor Author

我觉得这个问题应该是因为中文使用基于字符的分词方法,每个汉字可以作为一个独立的词项,因此部分匹配(如“二分”匹配“二分图”)自然有效。而英文使用的分词器通常是基于单词进行分词,无法直接支持单词的部分匹配。所以即使在代码中写了最少需要75%的匹配也对英文不起作用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant