hanzidentifier
Python module that identifies Chinese text as Simplified or Traditional.
Decision gist · record as of 2026-08-14
Yes, if you need to classify Chinese text by script system. The package is stable, has no known vulnerabilities, and installs with minimal friction. Maintenance is dormant but the codebase is mature and the task it solves is well-defined. The single dependency (zhon) is also lightweight. Consider it a solid choice for text processing pipelines that must distinguish Simplified from Traditional Chinese.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction: pure Python wheel with a single dependency (zhon).
- Maintenance is dormant—last release was 632 days ago and no recent commits—but the package is marked stable and the repository is not archived.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; attribution required.
last release 2024-11-20 (632 days) · last repo commit 2024-11-20 · 105 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 549,195 downloads/mo, #6,056 on PyPI
Alternatives
Verify before relying
pip install hanzidentifier
import hanzidentifier
result = hanzidentifier.identify('你好')
if result is hanzidentifier.SIMPLIFIED:
print('Simplified Chinese')- Whether the CC-CEDICT data bundled via zhon is current enough for modern Chinese text.
- Performance characteristics on very long strings or bulk processing workloads.
What it is and what it does
Hanzidentifier is a lightweight Python module that classifies Chinese text by script system. It examines strings for Simplified characters, Traditional characters, or a mix of both, returning one of five classification constants: UNKNOWN (no Chinese), SIMPLIFIED, TRADITIONAL, BOTH (characters valid in both systems), or MIXED (both script-exclusive characters present). The package relies on zhon's CC-CEDICT dictionary to recognize Chinese characters; characters not in that dictionary are ignored during classification.
The module is designed for straightforward text-processing tasks where you need to know what kind of Chinese characters are present. It offers both high-level helper functions (has_chinese, is_simplified, is_traditional) and a lower-level identify() function for more granular control. It has no external system dependencies and installs as a pure Python wheel.
Use it for
- Validate user input in a form to ensure it uses the expected Chinese script variant.
- Route Chinese text to appropriate downstream processing pipelines based on script type.
- Filter or categorize documents in a corpus by their Chinese character system.
- Detect mixed-script content that may indicate encoding errors or intentional code-switching.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to classify Chinese text by script system.
The package is stable, has no known vulnerabilities, and installs with minimal friction. Maintenance is dormant but the codebase is mature and the task it solves is well-defined. The single dependency (zhon) is also lightweight. Consider it a solid choice for text processing pipelines that must distinguish Simplified from Traditional Chinese.
Install
hanzidentifier on PyPI
Before you install
Low friction: pure Python wheel with a single dependency (zhon). Maintenance is dormant—last release was 632 days ago and no recent commits—but the package is marked stable and the repository is not archived.
Requires Python 3.9 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions; attribution required.
Quickstart
pip install hanzidentifier
import hanzidentifier
result = hanzidentifier.identify('你好')
if result is hanzidentifier.SIMPLIFIED:
print('Simplified Chinese')
Verify before relying
- Whether the CC-CEDICT data bundled via zhon is current enough for modern Chinese text.
- Performance characteristics on very long strings or bulk processing workloads.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagezhon |
| Maintenance | Dormant 632 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 549,195 / month, #6,056 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Linguistic |
Evidence: hanzidentifier-1.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “chinese character classification”
- hanzidentifierIdentifies whether a string contains Simplified Chinese, Traditional…
- ddddocrRecognizes text and detects objects in captcha images using offline…
- zhonZhon provides character constants and regular expression patterns for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also zhon · opencc-python-reimplemented · identify · xpinyin · zhconv · OpenCC · pinyin · jieba · cnocr · pypinyin