Skip to main content

A ctypes-based OpenCC converter for Chinese.

Project description

An OpenCC converter for Python.

Installation

You should install OpenCC (1.0.x) library first.

Install the python library with pip:

$ pip install OpenCC

Features

  1. Compatible with CPython and PyPy (c-types)

  2. Cython implementation (TODO)

Usage

This library has only one method:

>>> import opencc
>>> opencc.convert('乾坤一擲')
>>> opencc.convert('乾坤一掷', config='s2t.json')

Config

Convert method accepts an additional config parameter. Available configs:

hk2s.json
s2hk.json
s2t.json
s2tw.json
s2twp.json
t2s.json
tw2s.json
tw2sp.json

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

OpenCC-0.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

OpenCC-0.2-py2-none-any.whl (3.7 kB view details)

Uploaded Python 2

File details

Details for the file OpenCC-0.2.tar.gz.

File metadata

  • Download URL: OpenCC-0.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for OpenCC-0.2.tar.gz
Algorithm Hash digest
SHA256 bfca25fb46add057454075ba4c4dfed51c19c09944a960e3920ac22ba24097e2
MD5 047bd2d40643177282b0662ea1fc1476
BLAKE2b-256 56fb5a7224ede65ac6271d163fcee81d4cb84f42a40667271f970faab97840df

See more details on using hashes here.

File details

Details for the file OpenCC-0.2-py2-none-any.whl.

File metadata

  • Download URL: OpenCC-0.2-py2-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for OpenCC-0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 c845abfcd6936ea110ff19de0da85e5ed99953cb03836be975bd0d5b163618e1
MD5 72108fec8308b89b0158f7ed6cd2e9b5
BLAKE2b-256 0818951a89e4638db357184d0acf338a89b7b8e48cf6c242243fe193d201dc5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page