What is pyOpenCC?
pyOpenCC is a Python wrapper for Open Chinese Converter
Installation
You need to install opencc-dev first, To install OpenCC:
Debian
apt-get install libopencc-dev -y
FreeBSD
cd /usr/ports/chinese/opencc make install clean
How to use it?
Following is a simple example
# -*- coding: utf8 -*-
import opencc
cc = opencc.OpenCC('zht2zhs.ini')
print cc.convert(u'Open Chinese Convert(OpenCC)「開放中文轉換」,是一個致力於中文簡繁轉換的項目,提供高質量詞庫和函數庫(libopencc)。')
And the output should be
Open Chinese Convert(OpenCC)「开放中文转换」,是一个致力于中文简繁转换的项目,提供高质量词库和函数库(libopencc)。
There are four convertion in opencc.
zht2zhs.ini - Traditional Chinese to Simplified Chinese
zhs2zht.ini - Simplified Chinese to Traditional Chinese
mix2zht.ini - Mixed to Traditional Chinese
mix2zhs.ini - Mixed to Simplified Chinese
Metadata
Release files for pyopencc 0.4.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyopencc-0.4.2.2.zip | 3.5 kB | Without provenance | Details for pyopencc-0.4.2.2.zip |
Release files / pyopencc-0.4.2.2.zip
| Download URL | pyopencc-0.4.2.2.zip |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b9f832833106fd1713eecded3641cf4f894102a66fcb543923fc755297105d3
|
|
BLAKE2b-256 checksum How to use checksums |
862086d1300e42436fc53ee77b58d7418211405c25edcda18e0fbbd74a4762c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyopencc 0.4.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.