-
Notifications
You must be signed in to change notification settings - Fork 133
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
BUG: 被忽略的空格 #8
Comments
不好意思,过了这么久才看到 |
建议在分词前使用 |
这个不准备修复了么? |
1、导致自动把 |
已修复。请使用 v0.0.5 版本 |
👍 建议仓库打上 tag,用 milestones, release 这些管理起来。 |
OK,已打上标签“v0.0.5” |
还是有问题,建议 Reopen。 0.0.5 版把空白字符当前分词要素,但是最终结果中还是忽略了空白字符本身: segment.doSegment("a a")
// 输出结果:
[ { w: 'a', p: 16 }, { w: 'a', p: 16 } ]
// 正确结果应该是:
[ { w: 'a', p: 16 }, { w: ' ', p: 16 }, { w: 'a', p: 16 } ] |
这不是Bug,而是设计的时候分词结果自动去掉了“无用”的空白字符。 不知道是否有必要保留这些空格 |
程序处理的时候,空白文本是内容的一部分,不应该被忽略掉。 han = "a a";
py = pinyin(han);
// 如果分词模块忽略掉空白字符:
py === "aa";
// 正确的应该是。
py === "a a"; |
The text was updated successfully, but these errors were encountered: