zhconv
A simple implementation of Simplified-Traditional Chinese conversion.
What it is and what it does
zhconv is a Chinese text converter that transforms between Simplified and Traditional Chinese using vocabulary tables derived from MediaWiki. It supports six regional variants—Mainland (zh-cn), Taiwan (zh-tw), Hong Kong (zh-hk), Singapore (zh-sg), generic Simplified (zh-hans), and generic Traditional (zh-hant)—and implements MediaWiki's full manual conversion syntax for context-aware transformations.
The package provides both a Python API (`convert()` and `convert_for_mw()` functions) and a command-line tool. It uses maximum forward matching to resolve ambiguous character sequences. No runtime dependencies are required, making it lightweight to install, though the source distribution has high install friction and the project has not been actively maintained since late 2021.
Use it for:
- Convert user-generated content or documentation between Chinese regional variants in web applications or content management systems.
- Batch-process Chinese text corpora to standardize between Simplified and Traditional forms for NLP or linguistic analysis.
- Support multilingual Chinese interfaces by dynamically converting text to the user's preferred regional variant.
- Parse or transform Chinese text embedded in MediaWiki markup or similar structured formats with variant-specific rules.
- Build Chinese language tools or libraries that need to normalize text across regional boundaries.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts text between Simplified and Traditional Chinese using MediaWiki vocabulary tables, supporting regional variants including Mainland, Taiwan, Hong Kong, and Singapore Chinese.
Yes, if you need Chinese Simplified-Traditional conversion and can tolerate dormant maintenance. The package has no runtime dependencies, no known vulnerabilities, and a stable API grounded in MediaWiki standards. Install friction is high due to source distribution, but the core functionality is straightforward. Not recommended for new projects requiring active maintenance or support; consider it for stable, self-contained use cases where regional Chinese text conversion is a minor feature.
Install
zhconv on PyPI
pip
pip install zhconvuv
uv add zhconvpoetry
poetry add zhconvInstalling zhconv
Before you install
High install friction due to source distribution; package is dormant (last release 2021-10-31, last commit 2024-04-17) with no active maintenance signal, though the repository remains public and unarchived.
License in practice
GPLv2+ copyleft license requires derivative works and distributions to be licensed under compatible terms; suitable for open-source projects but imposes obligations on proprietary use.
Quickstart
pip install zhconv
from zhconv import convert
print(convert(u'我幹什麼不干你事。', 'zh-cn'))
Requires Python 2 or 3; source distribution may require a C compiler or build tools on some systems.
Verify before relying
- Whether the package works reliably with modern Python versions (3.10+) given dormant maintenance status.
- Performance characteristics and accuracy on large texts or specialized vocabularies beyond MediaWiki's tables.
- Compatibility with current dependency chains in active Python projects.
Package facts
| License | GPLv2+ (copyleft) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 1,748 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 243,383/month — #8,804 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: zhconv-1.4.3.tar.gz
Keywords: chinese, conversion
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
opencc-python-reimplementedConverts text between Simplified Chinese,…
permissive · top 5,000 on PyPI
OpenCCConverts text between Traditional Chinese,…
permissive · top 15,000 on PyPI
cn2anConverts between Chinese numerals and Arabic…
permissive · top 15,000 on PyPI
wetextNormalizes and denormalizes text in Chinese,…
permissive · top 15,000 on PyPI
hanzidentifierIdentifies whether a string contains Simplified…
permissive · top 15,000 on PyPI
jiebaJieba segments Chinese text into words using…
permissive · top 5,000 on PyPI
cnocrCnOCR recognizes text in images—Chinese…
permissive · top 15,000 on PyPI
pypinyinConverts Chinese characters to pinyin…
permissive · top 5,000 on PyPI
zhonZhon provides character constants and regular…
permissive · top 15,000 on PyPI