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

如果遇到中文标点就体内停止转换了。 #13

Closed
diguage opened this issue Nov 26, 2013 · 4 comments
Closed

如果遇到中文标点就体内停止转换了。 #13

diguage opened this issue Nov 26, 2013 · 4 comments

Comments

@diguage
Copy link

diguage commented Nov 26, 2013

搜汉字转拼音时,从Ruby China的一个回复中,找到了这个。但是,在测试中发现一个问题。如下:

我的测试代码如下:

Pinyin.t("测试一下,Think diff", splitter: '-')

希望的结果应该如下:

"ce-shi-yi-xia-Think-diff"

但是,得到的结果确实这样的:

"ce-shi-yi-xia-,Think diff"

请看一下,这是否是个问题?

@hongliang-goudou
Copy link
Collaborator

中文标点跟英文一样不转换,原封不动保留,这应该是正确的行为吧

@flyerhzm
Copy link
Owner

@hongliang-goudou 他说的是停止转换,应该是个bug,另外可以考虑增加 ignore-punctuation 参数来忽略标点符号

@flyerhzm
Copy link
Owner

flyerhzm commented Dec 1, 2013

@diguage 已经修复,可以升级到0.6.1版本试试

@flyerhzm flyerhzm closed this as completed Dec 1, 2013
@diguage
Copy link
Author

diguage commented Dec 6, 2013

好的,谢谢!

项目中想使用这个gem,希望有机会向您请教请教。如果可以,希望能出点力,贡献点代码。哈哈

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

3 participants