Skip to content

petitchamp/pinyin.py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pinyin.py

汉字转拼音,With Python

Example:

from pinyin import PinYin

test = PinYin()    
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

About

汉字转拼音,With Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%