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

ik_max_word 的分词能否包含ik_smart的分词 #977

Open
beijingcn opened this issue Sep 28, 2022 · 1 comment
Open

ik_max_word 的分词能否包含ik_smart的分词 #977

beijingcn opened this issue Sep 28, 2022 · 1 comment

Comments

@beijingcn
Copy link

比如 关键词 “512寸红色”, ik_max_word 不包含 ik_smart 里面的 “512寸”

ik_smart:
{
"tokens" : [
{
"token" : "512寸",
"start_offset" : 0,
"end_offset" : 4,
"type" : "TYPE_CQUAN",
"position" : 0
},
{
"token" : "红色",
"start_offset" : 4,
"end_offset" : 6,
"type" : "CN_WORD",
"position" : 1
}
]
}

ik_max_word:

{
"tokens" : [
{
"token" : "512",
"start_offset" : 0,
"end_offset" : 3,
"type" : "ARABIC",
"position" : 0
},
{
"token" : "寸",
"start_offset" : 3,
"end_offset" : 4,
"type" : "COUNT",
"position" : 1
},
{
"token" : "红色",
"start_offset" : 4,
"end_offset" : 6,
"type" : "CN_WORD",
"position" : 2
},
{
"token" : "红",
"start_offset" : 4,
"end_offset" : 5,
"type" : "CN_WORD",
"position" : 3
},
{
"token" : "色",
"start_offset" : 5,
"end_offset" : 6,
"type" : "CN_CHAR",
"position" : 4
}
]
}

@SenLeeLee
Copy link

自定义词,否者不能;因为ik_max_word和ik_smart分词方式不同

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