Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Aug 23, 2015
2 parents 313c2a3 + 53c709b commit 2d39361
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -2,6 +2,12 @@ Changelog
---------


0.8.4 (2015-08-23)
++++++++++++++++++++

* ``y``, ``w`` 也不是声母. (`hotoo/pinyin#57 <https://github.com/hotoo/pinyin/issues/57>`__)


0.8.3 (2015-08-20)
++++++++++++++++++++

Expand Down
4 changes: 2 additions & 2 deletions pypinyin/__init__.py
Expand Up @@ -14,7 +14,7 @@
from . import phonetic_symbol, pinyin_dict

__title__ = 'pypinyin'
__version__ = '0.8.3'
__version__ = '0.8.4'
__author__ = 'mozillazg, 闲耘'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2014 mozillazg, 闲耘'
Expand Down Expand Up @@ -48,7 +48,7 @@
# 单字拼音库
PINYIN_DICT = pinyin_dict.pinyin_dict.copy()
# 声母表
_INITIALS = 'zh,ch,sh,b,p,m,f,d,t,n,l,g,k,h,j,q,x,r,z,c,s,y,w'.split(',')
_INITIALS = 'b,p,m,f,d,t,n,l,g,k,h,j,q,x,r,z,c,s,zh,ch,sh'.split(',')
# 带声调字符与使用数字标识的字符的对应关系,类似: {u'ā': 'a1'}
PHONETIC_SYMBOL = phonetic_symbol.phonetic_symbol.copy()
# 所有的带声调字符
Expand Down
9 changes: 6 additions & 3 deletions tests/test_pinyin.py
Expand Up @@ -222,11 +222,14 @@ def test_simple_seg():
],
# 误把 yu 放到声母列表了
['鱼', {'style': TONE2}, ['yu2']],
['鱼', {'style': FINALS}, ['u']],
['鱼', {'style': FINALS}, ['yu']],
['雨', {'style': TONE2}, ['yu3']],
['雨', {'style': FINALS}, ['u']],
['雨', {'style': FINALS}, ['yu']],
['元', {'style': TONE2}, ['yua2n']],
['元', {'style': FINALS}, ['uan']],
['元', {'style': FINALS}, ['yuan']],
# y, w 也不是拼音
['呀', {'style': INITIALS}, ['']],
['无', {'style': INITIALS}, ['']],
]


Expand Down

0 comments on commit 2d39361

Please sign in to comment.