Giter Site home page Giter Site logo

char's Introduction

Image

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).

Online Demo

Char Converter Demo

Python

Install

pip install char-converter

Usage

Convert text

  1. Mode: one2one
from char_converter import CharConverter

text = '苟馀情其訫姱㠯练要兮,镸顑頷亦何伤。'

converter = CharConverter('v2t')
converted_text = converter.convert(text)
# 苟餘情其信姱以練要兮,長顑頷亦何傷。

converter = CharConverter('v2s')
converted_text = converter.convert(text)
# 苟余情其信姱以练要兮,长顑颔亦何伤。
  1. Mode: one2many
from char_converter import CharConverter

text = '鈡𩄇毓秀'

converter = CharConverter('v2t')
converter.set_mode('one2many')
converted_text = converter.convert(text)
# 【鍾|鐘】靈毓秀

Convert file

from char_converter import CharConverter

converter = CharConverter('v2s')
converter.convert_file(input_file, output_file)

Data source

CBDB Project

OpenCC image

Dictionary of Variant Chinese Characters

General Standard Chinese Characters Table

Data filtering

Image

Contributors

Yuqi Chen (data collection and programming)

Hongsu Wang (project manager)

Yiyi Wang (proofreading)

Fengyi Ji (data collection)

Kaini Xiong (proofreading)

License

License: CC BY-SA 4.0

char's People

Contributors

yukiyuqichen avatar sudoghut avatar

Stargazers

Duncan Paterson avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.