汉语拼音转换工具
Project description
Python 拼音
将汉语转为拼音。可以用于汉字注音、排序、检索。基于 pinyinjs 开发。
Documentation: http://pypinyin.rtfd.org
Free software: MIT license
Python version: 2.6, 2.7
Installation
To install pypinyin, simply:
$ pip install pypinyin
Basic Usage
>>> from pypinyin import pinyin
>>> import pypinyin
>>> pinyin(u'中心')
[[u'zh\u014dng'], [u'x\u012bn']]
>>> pinyin(u'中心', heteronym=True) # 启用多音字模式
[[u'zh\u014dng', u'zh\xf2ng'], [u'x\u012bn']]
>>> pinyin(u'中心', pypinyin.STYLE_INITIALS) # 设置拼音风格
[['zh'], ['x']]
Changelog
0.1.0 (2013-09-21)
Initial Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypinyin-0.1.0.zip
(604.2 kB
view details)
File details
Details for the file pypinyin-0.1.0.zip
.
File metadata
- Download URL: pypinyin-0.1.0.zip
- Upload date:
- Size: 604.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5000564f9b3f294e91fecd7bd9f52fabad3716277db8feb8ede0b9ce246a505 |
|
MD5 | 7207b0f7f95bf6456ff091a106252e56 |
|
BLAKE2b-256 | d396467f442a97a81eef8b051e944ffa79e2e17ada025dd0c2f329089c7715a4 |