-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
ik_smart分词结果不是ik_max_word的子集吗 #584
Comments
同样存在这个疑问 |
不一致好像是smart的特性导致的, |
在ik_max_word的分词结果任意组合不能拼接出原始词的情况下,是ik_smart的分词结果不包含于ik_max_word的分词结果的原因之一 |
那这个有参数可以关吗? |
好像老的版本的ik_max_word是能把单字给分出来的 |
我后来是把extra_single_word_full.dic加载进来了,这样子对汉字是可以保证ik_smart是ik_max_word的子集 |
不过还有数词合并的搜不到 |
这个问题太严重了,我还是决定换分词插件 |
本来就两种类型的分词结果,最好不用混用。 |
README里的例子不是混用吗? |
如果你有停用词,需要混用,检索的时候用 ik_max_word, 索引的时候用 ik_smart , ik_max_word 会包含停用词, 但是ik_smart 不会包含,这样更精确。例子,维生素缺乏, 如果维生素是停用词, 那 ik_smart 不会包含维生素, 而 ik_max_word 会包含维生素,这样就永远不会搜出 维生素缺乏, 此时如果检索也用 ik_smart , 检索的维生素会被停用,实际效果相当于检索包含 缺乏 的文档 |
而都用 ik_max_word 的话,感觉实际效果就相当于 正则匹配 了, 字典没有用 |
貌似只能设置自定义词典临时解决一下了,有点坑 |
|
之前一直以为是这样的。所以用ik_max_word建索引,用ik_smart搜索,结果匹配不上是两边分词结果不是包含关系造成的
The text was updated successfully, but these errors were encountered: