Skip to main content

Chinese Pronounce in Kana

Overview

This library is designed to convert Chinese text into Japanese Katakana characters based on their pronunciation.

Demo

  1. 凱文要不要吃香蕉

https://github.com/RUI-LONG/Python-Pinyin-Kana/assets/25581309/a974f9e7-61d8-43d2-9a46-a74e57411669

  1. 你應該要被加薪

https://github.com/RUI-LONG/Python-Pinyin-Kana/assets/25581309/4637d939-4e9f-4de5-8230-6112d0c7007b

  1. 哩喜嘞工三小

https://github.com/RUI-LONG/Python-Pinyin-Kana/assets/25581309/01e95025-5237-40a4-b041-3313794e1f45

Installation

Prerequisite: pinyin-kana requires Python 3.7 or higher

pip install pinyin-kana

Usage

Here's a simple example of how to use the PronounceConverter class to convert Chinese text to Katakana:

from pinyin_kana import to_katakana

result = to_katakana("你好")
print(" ".join(result))

print(
    f"https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=ja&q={'+'.join(result)}"
)

Download files

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

Source Distribution

pinyin_kana-0.0.6.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pinyin_kana-0.0.6-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file pinyin_kana-0.0.6.tar.gz.

File metadata

  • Download URL: pinyin_kana-0.0.6.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pinyin_kana-0.0.6.tar.gz
Algorithm Hash digest
SHA256 c050c1ca437d9999b6eb3a53d704c4f582515d54e5c4c93c21f9ae58977012b1
MD5 5ac262b50b4e9118049d0b819948cf03
BLAKE2b-256 7735d4731ce2b8d1d2059a29cf1d22aa20c505d18e520654c5056be390c570e0

See more details on using hashes here.

File details

Details for the file pinyin_kana-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pinyin_kana-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pinyin_kana-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d41381321d00d46d89b67cdd277d5e5c295ccd7fc83b06b50c3b202d83c183f0
MD5 e66754611d5c37352be245b516a80a20
BLAKE2b-256 b0dc4b929b4495844946b2eaccfab79399a4cea491a31c2450127c702860ae23

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page