A library to convert variant Chinese characters to standard simplified or traditional characters.
Project description
Chinese Character Variant Converter,
an open-source library for converting Chinese character variants to standard simplified or traditional characters.
Install
pip install char-converter
Usage
Convert text
from char_converter import CharConverter
text = '苟馀情其訫姱㠯练要兮,镸顑頷亦何伤。'
converter = CharConverter('v2t')
converted_text = converter.convert(text)
# 苟餘情其信姱以練要兮,長顑頷亦何傷。
converter = CharConverter('v2s')
converted_text = converter.convert(text)
# 苟余情其信姱以练要兮,长顑颔亦何伤。
Convert file
from char_converter import CharConverter
converter = CharConverter('v2s')
converter.convert_file(input_file, output_file)
Data source
Dictionary of Variant Chinese Characters
General Standard Chinese Characters Table
Data filtering
Contributor
Yuqi Chen (data collection and programing)
Hongsu Wang (project manager)
Yiyi Wang (proofreading), Fengyi Ji (data collection)
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
char_converter-0.36.tar.gz
(83.5 kB
view details)
Built Distribution
File details
Details for the file char_converter-0.36.tar.gz
.
File metadata
- Download URL: char_converter-0.36.tar.gz
- Upload date:
- Size: 83.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fab309324e2ee6cdf811f30119d8036bcac5a1c4e9ab2c262da47fb10be8e560 |
|
MD5 | a4648bb5f8b33e6bb125bdf23990162b |
|
BLAKE2b-256 | dc78fdd1c42b53639f1f32ea7aab85e4f3a86d86b0a4d5045d8dca7a4817ae8a |
File details
Details for the file char_converter-0.36-py3-none-any.whl
.
File metadata
- Download URL: char_converter-0.36-py3-none-any.whl
- Upload date:
- Size: 80.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 078c0abef05efba87514979e87870ac97a6124052e5aaa068b612a980ebba74d |
|
MD5 | f0a1160d1490d2cda4f546145c6b3161 |
|
BLAKE2b-256 | 40e10771b27120977f31de76ec2a97dfa79fea6be917ce336d4c975fba0058ec |