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

用户词典部分词语没有生效 #66

Closed
ashengtx opened this issue Mar 22, 2018 · 1 comment
Closed

用户词典部分词语没有生效 #66

ashengtx opened this issue Mar 22, 2018 · 1 comment

Comments

@ashengtx
Copy link

在用户词典中含有这几个词,皮皮虾皮皮虾我们走<song></song>,分别对下面两个句子进行分词:

sent1 = '请拨皮皮虾我们走'
sent2 = '请拨<song>皮皮虾我们走</song>'

结果分别为

result1: ['请', '拨皮', '皮虾', '我们走']
result2: ['请', '拨', '<song>', '皮皮虾我们走', '</song>']

为什么会这样?用户词典中没有拨皮,也没有皮虾拨皮也不是一个正常的词。
有没办法解决?

@gzp9595
Copy link
Member

gzp9595 commented Jan 9, 2019

是这样的,我们的词表主要是使用后处理来进行,也就是如果分词时一个词被切分成了几部分,并且不是单独出现时,就不会强制进行合并处理

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