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

修复get_text_idx函数,将中文词转为id时最后一个词匹配错误的bug #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

burette
Copy link

@burette burette commented Dec 19, 2019

你好,在研究你的代码的时候,发现get_text_idx函数的处理稍有瑕疵,个人进行一些调整,望能并入给更多人的看到。
仔细地说,举个例子。
文本中:”0 标准间 太 差 房间 不如 星 而且 设施 非常 陈旧 建议 酒店 把 老 标准间 从 新 改善 “
你原来最后一个单词为[...,'改善\n'],无法匹配到词库中到id,匹配到unknown。
详见代码,欢迎交流

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

Successfully merging this pull request may close these issues.

1 participant