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

这句的转换有重复,可能是bug #36

Closed
letiantian opened this issue Feb 4, 2016 · 5 comments
Closed

这句的转换有重复,可能是bug #36

letiantian opened this issue Feb 4, 2016 · 5 comments

Comments

@letiantian
Copy link

>>> s=u"两年前七斤喝醉了酒"
>>> pypinyin.lazy_pinyin(s)
[u'liang', u'nian', u'qian', u'qi', u'jin', u'he', u'zui', u',he', u'zui', u'jiu', u'liao', u'jiu']

结果中多了u',he', u'zui', u'jiu', 应该是bug

node版本没有这个问题:

> var pinyin = require("pinyin");
undefined
> s='你好了解了'
'你好了解了'
> pinyin(s)
[ [ 'nǐ' ], [ 'hǎo' ], [ 'liǎo' ], [ 'jiě' ], [ 'liǎo' ] ]
> s='两年前七斤喝醉了酒'
'两年前七斤喝醉了酒'
> pinyin(s)
[ [ 'liǎng' ],
  [ 'nián' ],
  [ 'qián' ],
  [ 'qī' ],
  [ 'jīn' ],
  [ 'hē' ],
  [ 'zuì' ],
  [ 'liǎo' ],
  [ 'jiǔ' ] ]

@letiantian letiantian changed the title 这句的转换为什么有重复 这句的转换有重复,可能是bug Feb 4, 2016
@mozillazg
Copy link
Owner

@someus 谢谢,我看看。

mozillazg added a commit that referenced this issue Feb 13, 2016
@mozillazg
Copy link
Owner

最新版(0.11.0)未复现:

$ python
Python 2.7.10 ...
>>> import pypinyin
>>> pypinyin.__version__
u'0.11.0'
>>> s=u"两年前七斤喝醉了酒"
>>> pypinyin.lazy_pinyin(s)
[u'liang', u'nian', u'qian', u'qi', u'jin', u'he', u'zui', u'liao', u'jiu']
 $ python
Python 3.5.1 ...
>>> import pypinyin
>>> pypinyin.__version__
'0.11.0'
>>> s="两年前七斤喝醉了酒"
>>> pypinyin.lazy_pinyin(s)
['liang', 'nian', 'qian', 'qi', 'jin', 'he', 'zui', 'liao', 'jiu']

其他 python 版本下的测试 也未复现。
不知道你是用的是哪个版本的 Python 和 pypinyin?

@mozillazg
Copy link
Owner

mozillazg added a commit that referenced this issue Feb 16, 2016
@mozillazg
Copy link
Owner

最新版已修复此问题。

@letiantian
Copy link
Author

好的,了解了。

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

2 participants