Skip to main content

Translate chinese chars to pinyin based on Mandarin.dat

Project description

http://img.shields.io/pypi/v/pinyin.svg?style=flat http://img.shields.io/travis/lxyu/pinyin/master.svg?style=flat http://img.shields.io/pypi/dm/pinyin.svg?style=flat

Translate chinese chars to pinyin based on Mandarin.dat

Install

$ pip install pinyin

Usage

>>> import pinyin
>>> print pinyin.get('你 好')
 hǎo

>>> print pinyin.get('你好', format="strip", delimiter=" ")
ni hao

>>> print pinyin.get('你好', format="numerical")
ni3hao3

>>> print pinyin.get_initial('你好')
n h

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pinyin-0.3.tar.gz (126.6 kB view details)

Uploaded Source

File details

Details for the file pinyin-0.3.tar.gz.

File metadata

  • Download URL: pinyin-0.3.tar.gz
  • Upload date:
  • Size: 126.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pinyin-0.3.tar.gz
Algorithm Hash digest
SHA256 643bc967a2391d8f196b0c53209467fb10d3351d4da015c1b2e1e6d01988aca5
MD5 fec2093744dd143e1d3ca0eddc3e6350
BLAKE2b-256 2abd81558c3ac18cd584a931e9d510b493eeee8330cbcb7ee5a3fbd0e9a7770f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page