--- id: zhon version: "2.1.1" license: MIT license_treatment: permissive maintenance: dormant --- # zhon — Zhon provides constants used in Chinese text processing. License: permissive · Maintenance: dormant · Downloads: 571.8K/mo ## What it is and what it does Zhon is a reference library of constants for Chinese language processing. It exports pre-defined character sets (CJK characters, radicals, punctuation), Pinyin validation patterns (vowels, consonants, syllable/word/sentence regex), Zhuyin marks, and CC-CEDICT character references. The package has no runtime dependencies and is designed to be imported and used with Python's re module or other text processing tools. Typical use is to extract or validate Chinese text components: finding all hanzi characters in a mixed-language string, matching Pinyin syllables or words with regex, or validating sentence structure. It's a data reference, not an algorithm library—you provide the processing logic (usually regex) and zhon provides the character classes and patterns. Use it for: - Extract all CJK characters from mixed-language text using zhon.hanzi.characters with regex - Validate and extract Pinyin syllables or words from romanized Chinese using zhon.pinyin patterns - Build Chinese text segmentation or tokenization tools that rely on character class definitions - Identify Chinese punctuation marks in text for parsing or cleaning tasks - Validate Zhuyin (bopomofo) syllables in phonetic Chinese text processing ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Zhon provides character constants and regular expression patterns for processing Chinese text, including CJK characters, Pinyin syllables, and Zhuyin marks. Yes. Zhon is a stable, dependency-free reference library for Chinese text processing with no known vulnerabilities. Install it if you're building tools that need to identify, validate, or extract Chinese characters, Pinyin, or Zhuyin. The dormant maintenance status is not a concern for a constants-only package—the character sets it exports are unlikely to change frequently. ## Install pip install zhon uv add zhon poetry add zhon ## Installing zhon Before you install: Low install friction with no runtime dependencies. Dormant maintenance status (last release 2024-11-20, last commit 2024-12-11) but stable and widely used; no active development but no signs of abandonment. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: import re import zhon.hanzi # Find CJK characters in a string re.findall('[{}]'.format(zhon.hanzi.characters), 'I broke a plate: 我打破了一个盘子.') # Returns: ['我', '打', '破', '了', '一', '个', '盘', '子'] Verify before relying: - Whether the package's character sets and patterns are current with Unicode standards for modern Chinese text ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 571.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags chinese text processing constants, cjk character patterns, pinyin regex validation, hanzi character sets, chinese punctuation marks, zhuyin syllable patterns, mandarin text utilities, chinese-nlp, character-data, regex-patterns [View on SkillFed](https://skillfed.io/packages/zhon) · [View on PyPI](https://pypi.org/project/zhon/)