Smart Chinese-to-Pinyin converter.
Project description
Pinyin
Smart Chinese-to-Pinyin converter.
fork from https://github.com/mapix/Pinyin
Getting Started
pip install smart_pinyin
Usage
>>> from pinyin import Pinyin
>>> pinyin = Pinyin()
>>> ' '.join(pinyin.get_pinyin('银行行长潘玮柏长了一头乌黑的白发, 睡觉睡的很晚, 道行很深', failure=''))
>>> u'yin hang hang zhang pan wei bo zhang le yi tou wu hei de bai fa shui jiao shui de hen wan dao heng hen shen'
>>> for i in pinyin.get_pinyin_all('自行车'): print list(i)
[u'zi', u'hang', u'che']
[u'zi', u'hang', u'ju']
[u'zi', u'heng', u'che']
[u'zi', u'heng', u'ju']
[u'zi', u'xing', u'che']
[u'zi', u'xing', u'ju']
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
smart_pinyin-0.5.1.tar.gz
(148.1 kB
view details)
Built Distribution
smart_pinyin-0.5.1-py3-none-any.whl
(144.1 kB
view details)
File details
Details for the file smart_pinyin-0.5.1.tar.gz
.
File metadata
- Download URL: smart_pinyin-0.5.1.tar.gz
- Upload date:
- Size: 148.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
80a6fb2f28bd7eeb519f06827957d0bd338404a1ceb8fc9b86e894edfbbb9e47
|
|
MD5 |
1a894cbfc73485f61c878431c2ce8d82
|
|
BLAKE2b-256 |
fd3e5ccac04dfdc466b66f08ce6c8ff255ae666a7fbe7f7f07d919930b92ebf8
|
File details
Details for the file smart_pinyin-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: smart_pinyin-0.5.1-py3-none-any.whl
- Upload date:
- Size: 144.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
85637a20c11736443814a8f6c53b2a81c3a2b8ddbc80a6bb4baad8e7256617e8
|
|
MD5 |
86ff51868e4e92edbc6aa1078cc66dbe
|
|
BLAKE2b-256 |
c75db754782a7adaf9e755325c5970e1cfaa5f1b9fc14dbf6639bae1f5874073
|