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

希望增加 hao_max_word 模式 #55

Open
qbit-git opened this issue Oct 20, 2022 · 2 comments
Open

希望增加 hao_max_word 模式 #55

qbit-git opened this issue Oct 20, 2022 · 2 comments

Comments

@qbit-git
Copy link
Contributor

hao 分词器

  • hao_index_mode
关键词: 图书发行第一股
分词结果: 图书发行、图书、发行、第一股、第一
期望结果:图书发现、图书、发现、第一股、第一、股
关键词:图书股
分词结果:图书、股
期望结果:图书股、图书、股

当前在 and 模式下,搜索“图书股”不能匹配“ 图书发行第一股”

  • hao_index_mode,autoWordLength=3
关键词: 图书发行第一股
分词结果: 图书发行、图书、发行、第一股、第一
期望结果: 图书发行、图书、发行、第一股、第一、股
关键词:图书股
分词结果:图书股、图书
期望结果:图书股、图书、股

当前在 and 模式下,搜索“图书股”不能匹配“ 图书发行第一股”

ik 分词器

  • ik_max_word
关键词: 图书发行第一股
分词结果: 图书、发行、第一、一股、一、股
关键词:图书股
分词结果:图书、股

当前在 and 模式下,搜索“图书股”可匹配“ 图书发行第一股”

建议

希望增加类似 ik_max_mode 模式的 hao_max_word 模式

@tenlee2012
Copy link
Owner

tenlee2012 commented Oct 20, 2022

当前在 and 模式下,搜索“图书股”不能匹配“ 图书发行第一股”

需要开启 enableSingleWord=true,继续递归,直到单字位置

@qbit-git
Copy link
Contributor Author

qbit-git commented Oct 20, 2022

enableSingleWord=true
会分词出:图书股、图书、图、书、股
全部成单字也不好
既然“图书”从“图书股”里面分了出来,那么剩余的部分不要直接丢弃
剩余部分不能再分成词可以分成单字,但也不要把所有单字分出来
比如“图书头大”,
不要分词成 图书、图、书、头、大
可以分词成 图书、头、大

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

No branches or pull requests

2 participants