Skip to content
汉字转拼音,With Python
Latest commit 09825a0 Sep 14, 2012 1 @cleverdeng modif README
Failed to load latest commit information.
.gitignore Initial commit Sep 13, 2012
README.md modif README Sep 14, 2012
pinyin.py u Sep 14, 2012
setup.py
word.data u Sep 14, 2012

README.md

pinyin.py

汉字转拼音,With Python

Example:

from pinyin import PinYin

test = PinYin()
test.load_word()
test.hanzi2pinyin(string='钓鱼岛是中国的')

Out:

test.hanzi2pinyin(string='钓鱼岛是中国的')
['diao', 'yu', 'dao', 'shi', 'zhong', 'guo', 'de']    
test.hanzi2pinyin_split(string='钓鱼岛是中国的', split="-")
diao-yu-dao-shi-zhong-guo-de
Something went wrong with that request. Please try again.