
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
.. image:: https://badge.fury.io/py/zhon.svg :target: https://pypi.org/project/zhon
.. image:: https://github.com/tsroten/zhon/actions/workflows/ci.yml/badge.svg :target: https://github.com/tsroten/zhon/actions/workflows/ci.yml
Zhon is a Python library that provides constants commonly used in Chinese text processing.
MIT license <http://opensource.org/licenses/MIT>
_Zhon's constants can be used in Chinese text processing, for example:
Find CJK characters in a string:
.. code:: python
re.findall('[{}]'.format(zhon.hanzi.characters), 'I broke a plate: 我打破了一个盘子.') ['我', '打', '破', '了', '一', '个', '盘', '子']
Validate Pinyin syllables, words, or sentences:
.. code:: python
re.findall(zhon.pinyin.syllable, 'Yuànzi lǐ tíngzhe yí liàng chē.', re.I) ['Yuàn', 'zi', 'lǐ', 'tíng', 'zhe', 'yí', 'liàng', 'chē']
re.findall(zhon.pinyin.word, 'Yuànzi lǐ tíngzhe yí liàng chē.', re.I) ['Yuànzi', 'lǐ', 'tíngzhe', 'yí', 'liàng', 'chē']
re.findall(zhon.pinyin.sentence, 'Yuànzi lǐ tíngzhe yí liàng chē.', re.I) ['Yuànzi lǐ tíngzhe yí liàng chē.']
Zhon includes the following commonly-used constants:
Install Zhon <https://tsroten.github.io/zhon/installation.html>
_Learn how to use Zhon <https://tsroten.github.io/zhon/api.html>
_Contribute <https://github.com/tsroten/zhon/blob/develop/CONTRIBUTING.rst>
_ documentation, code, or feedbackFAQs
Zhon provides constants used in Chinese text processing.
We found that zhon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.