Convert English words to numbered Pinyin using CMUdict IPA.
Project description
pyenglish2pinyin
Python package to convert English words into numbered Pinyin using CMUdict-style IPA.
Install
pip install pyenglish2pinyin
Usage
from english2pinyin import english2ipa, english2pinyin, ipa2pinyin
print(english2ipa("application"))
# AE2 P L AH0 K EY1 SH AH0 N
print(english2pinyin("application"))
# ai4 po5 la5 kui1 sha5 en5
print(ipa2pinyin("S IH0 K Y UH1 R IH0 NG"))
# xi5 ke5 yu1 rui5 eng5
API
english2ipa(word, dict_path=None)->str | Noneenglish2pinyin(word, dict_path=None, throw_if_missing=False)->stripa2pinyin(ipa_text)->str
Development
pip install -e .[dev]
pytest
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
pyenglish2pinyin-0.1.0.tar.gz
(922.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyenglish2pinyin-0.1.0.tar.gz.
File metadata
- Download URL: pyenglish2pinyin-0.1.0.tar.gz
- Upload date:
- Size: 922.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a24e70d2fd132a1640e3a23e15fa78120dafb4557c4a1024c00ebec7216b26ff
|
|
| MD5 |
f4d4f80f1b5e54427b48375563b4b711
|
|
| BLAKE2b-256 |
6f0eda2e9040ae7ad1f18c05cf498496a97b3d9be5a0b5b58b116884aa396a20
|
File details
Details for the file pyenglish2pinyin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyenglish2pinyin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 924.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0426468c7dab5700c158565ad392dfdcbd9475d37ba4b44240c2cd8456df4616
|
|
| MD5 |
965ae9d4aee41cf65f2749f2c740f3c3
|
|
| BLAKE2b-256 |
11af86ec7b3b6010d06df5657f2eaca995131a8e4b3f544d92007e613dc1eff6
|