Chinese Character Variant Converter,
an open-source library for converting Chinese character variants to standard simplified or traditional characters.
* About the project's name and logo: "CHAR" comes from "Chinese character variant" and also refers to a type of beautiful fish with a gradient of red color (Arctic Char).
pip install char-converter
- Mode: one2one
from char_converter import CharConverter
text = '苟馀情其訫姱㠯练要兮,镸顑頷亦何伤。'
converter = CharConverter('v2t')
converted_text = converter.convert(text)
# 苟餘情其信姱以練要兮,長顑頷亦何傷。
converter = CharConverter('v2s')
converted_text = converter.convert(text)
# 苟余情其信姱以练要兮,长顑颔亦何伤。
- Mode: one2many
from char_converter import CharConverter
text = '鈡𩄇毓秀'
converter = CharConverter('v2t')
converter.set_mode('one2many')
converted_text = converter.convert(text)
# 【鍾|鐘】靈毓秀
from char_converter import CharConverter
converter = CharConverter('v2s')
converter.convert_file(input_file, output_file)
Dictionary of Variant Chinese Characters
General Standard Chinese Characters Table
Yuqi Chen (data collection and programming)
Hongsu Wang (project manager)
Yiyi Wang (proofreading)
Fengyi Ji (data collection)
Kaini Xiong (proofreading)