fix(punctuator): space should not be translated#1167
Merged
Conversation
Member
|
老師,我看懂是做什麼用了。 |
|
这个 Bug 在我这里也复现了,数字后紧跟点号按空格上屏会额外多输出"/(",这明显不符合预期。 |
Member
Author
|
我怀疑词库编译也有问题,正常来说用 |
Member
Author
|
之前的写法有个问题是 punct_segmentor 必须放到 abc_segmentor 之前才能生效(即使朙月拼音也把 abc_segmentor 放到 punct_segmentor 之前了),换了个写法兼容了 punct_segmentor 在后面的写法。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
follow-up #980
ctx->PushInput(' ')will trigger input update and in turn translation. During segmentation,.is taggedpunct_number, butis tagged 'abc'. Sometimes, the translation result is not empty, and this can cause some additional text to be committed.