A ctypes-based OpenCC converter for Chinese.
Project description
An OpenCC converter for Python.
Installation
You should install OpenCC (0.4.3) library first.
Install the python library with pip:
$ pip install OpenCC
Features
Compatible with CPython and PyPy (c-types)
Cython implementation (TODO)
Usage
This library has only one method:
>>> import opencc
>>> opencc.convert('乾坤一擲')
>>> opencc.convert('乾坤一掷', config='zhs2zht.ini')
Config
Convert method accepts an additional config parameter. Available configs:
zhs2zhtw_p.ini zhs2zhtw_v.ini zhs2zhtw_vp.ini zht2zhtw_p.ini zht2zhtw_v.ini zht2zhtw_vp.ini zhtw2zhs.ini zhtw2zht.ini zhtw2zhcn_s.ini zhtw2zhcn_t.ini zhs2zht.ini zht2zhs.ini
Project details
Release history Release notifications | RSS feed
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.1.tar.gz
(6.5 kB
view details)
File details
Details for the file OpenCC-0.1.tar.gz.
File metadata
- Download URL: OpenCC-0.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
957ce2d52da705631b029e3cecc06bc2ab01d0cf249c3aae7a18c07736e3b263
|
|
| MD5 |
7da2f0efe10cf5f266a04a107dfe02f9
|
|
| BLAKE2b-256 |
44d0d84344995be80491ad72340eefa23d9c4f5f6e9bb0bb03bb2220b93c7d3f
|