Skip to main content

The `chinese-pronounce-in-kana` library is designed to convert Chinese text into Japanese Katakana characters based on their pronunciation.

Project description

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)}"
)

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_kana-0.0.6.tar.gz (14.3 kB view hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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