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

”!“导致无法按自定义词典分词的问题 #141

Open
Fan-chen04 opened this issue Mar 25, 2023 · 0 comments
Open

”!“导致无法按自定义词典分词的问题 #141

Fan-chen04 opened this issue Mar 25, 2023 · 0 comments

Comments

@Fan-chen04
Copy link

Fan-chen04 commented Mar 25, 2023

原文本为: "几年前去的了,冬天1月份去的!暖和还不错!"
自定义词典里加入了 "不错" 这个词。但是“不错”后跟着不同的标点符号会有不同结果。
若是”。“、”?“、”,“甚至空格跟着都会是正常分词 :['几', '年', '前', '去', '的', '了', ',', '冬天', '1月份', '去', '的', '!', '暖和', '还', '不错', '。']
感叹号”!“跟着则是这样:['几', '年', '前', '去', '的', '了', ',', '冬天', '1月份', '去', '的', '!', '暖和', '还', '不', '错', '!']
经测试这种情况与词在句子中的位置无关。
请问这种现象是怎么造成的呢,应该如何解决?

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

1 participant