Skip to main content

Python implementation of StarCC

Project description

StarCC-Py

简繁转换 簡繁轉換 Python implementation of StarCC, the next generation of Simplified-Traditional Chinese conversion framework

Discussion - on Telegram

安裝 Installation

pip install starcc

用法 Usage

不轉換用詞 Without phrase conversion:

from StarCC import PresetConversion
convert = PresetConversion(src='cn', dst='hk', with_phrase=False)
print(convert('为什么你在床里面睡着?我们的硅二极管坏了,要去老挝修理。'))
# 為什麼你在牀裏面睡着?我們的硅二極管壞了,要去老撾修理。

轉換用詞 With phrase conversion:

from StarCC import PresetConversion
convert = PresetConversion(src='cn', dst='tw', with_phrase=True)
print(convert('为什么你在床里面睡着?我们的硅二极管坏了,要去老挝修理。'))
# 為什麼你在床裡面睡著?我們的矽二極體壞了,要去寮國修理。

轉換模式一覽 Supported conversion modes

  • cn: Simplified Chinese (Mainland China)
  • hk: Traditional Chinese (Hong Kong)
  • tw: Traditional Chinese (Taiwan)
  • jp: Japanese Shinjitai

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

starcc-0.0.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

starcc-0.0.2-py3-none-any.whl (478.1 kB view details)

Uploaded Python 3

File details

Details for the file starcc-0.0.2.tar.gz.

File metadata

  • Download URL: starcc-0.0.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for starcc-0.0.2.tar.gz
Algorithm Hash digest
SHA256 732dc1a8185c67ae2d03ae69e1a4db7f7e957cc8d90e8620dbeab24263d10559
MD5 c189f2113cc392fe7484a60726b605c0
BLAKE2b-256 8aa6f52ab52c2a890e999efcf91fe25bee4c360bd620e326599b271aef89fe29

See more details on using hashes here.

Provenance

File details

Details for the file starcc-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: starcc-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 478.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for starcc-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cbfc49cadacafcf15b67830247bc62fe38a13b85766cd9b04d21240d5ec8fe45
MD5 5b8d18b9268a127a80f6b90c738ce4d6
BLAKE2b-256 00142d10d6e66e781349cdf49eb944d401ae676f507aad4d8acf9993c8567a08

See more details on using hashes here.

Provenance

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