zhon


Namezhon JSON
Version 2.0.2 PyPI version JSON
download
home_pageNone
SummaryZhon provides constants used in Chinese text processing.
upload_time2023-06-27 10:45:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords cc-cedict cedict characters chinese cjk han hanzi mandarin pinyin punctuation radicals segmentation simplified tokenization traditional unicode zhuyin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====
Zhon
====

.. 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.

* Documentation: https://tsroten.github.io/zhon/
* GitHub: https://github.com/tsroten/zhon
* Support: https://github.com/tsroten/zhon/issues
* Free software: `MIT license <http://opensource.org/licenses/MIT>`_

About
-----

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ē.']

Features
--------

Zhon includes the following commonly-used constants:

* CJK characters and radicals
* Chinese punctuation marks
* Chinese sentence regular expression pattern
* Pinyin vowels, consonants, lowercase, uppercase, and punctuation
* Pinyin syllable, word, and sentence regular expression patterns
* Zhuyin characters and marks
* Zhuyin syllable regular expression pattern
* CC-CEDICT characters

Getting Started
---------------

* `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 feedback

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "zhon",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "cc-cedict,cedict,characters,chinese,cjk,han,hanzi,mandarin,pinyin,punctuation,radicals,segmentation,simplified,tokenization,traditional,unicode,zhuyin",
    "author": null,
    "author_email": "Thomas Roten <thomas@roten.us>",
    "download_url": "https://files.pythonhosted.org/packages/cf/da/1ff0761d6c0d2fca7f19e65d19e960354dfe6cbc1664041e3c3e711d757a/zhon-2.0.2.tar.gz",
    "platform": null,
    "description": "====\nZhon\n====\n\n.. image:: https://badge.fury.io/py/zhon.svg\n    :target: https://pypi.org/project/zhon\n\n.. image:: https://github.com/tsroten/zhon/actions/workflows/ci.yml/badge.svg\n    :target: https://github.com/tsroten/zhon/actions/workflows/ci.yml\n\nZhon is a Python library that provides constants commonly used in Chinese text\nprocessing.\n\n* Documentation: https://tsroten.github.io/zhon/\n* GitHub: https://github.com/tsroten/zhon\n* Support: https://github.com/tsroten/zhon/issues\n* Free software: `MIT license <http://opensource.org/licenses/MIT>`_\n\nAbout\n-----\n\nZhon's constants can be used in Chinese text processing, for example:\n\n* Find CJK characters in a string:\n\n  .. code:: python\n\n    >>> re.findall('[{}]'.format(zhon.hanzi.characters), 'I broke a plate: \u6211\u6253\u7834\u4e86\u4e00\u4e2a\u76d8\u5b50.')\n    ['\u6211', '\u6253', '\u7834', '\u4e86', '\u4e00', '\u4e2a', '\u76d8', '\u5b50']\n\n* Validate Pinyin syllables, words, or sentences:\n\n  .. code:: python\n\n    >>> re.findall(zhon.pinyin.syllable, 'Yu\u00e0nzi l\u01d0 t\u00edngzhe y\u00ed li\u00e0ng ch\u0113.', re.I)\n    ['Yu\u00e0n', 'zi', 'l\u01d0', 't\u00edng', 'zhe', 'y\u00ed', 'li\u00e0ng', 'ch\u0113']\n\n    >>> re.findall(zhon.pinyin.word, 'Yu\u00e0nzi l\u01d0 t\u00edngzhe y\u00ed li\u00e0ng ch\u0113.', re.I)\n    ['Yu\u00e0nzi', 'l\u01d0', 't\u00edngzhe', 'y\u00ed', 'li\u00e0ng', 'ch\u0113']\n\n    >>> re.findall(zhon.pinyin.sentence, 'Yu\u00e0nzi l\u01d0 t\u00edngzhe y\u00ed li\u00e0ng ch\u0113.', re.I)\n    ['Yu\u00e0nzi l\u01d0 t\u00edngzhe y\u00ed li\u00e0ng ch\u0113.']\n\nFeatures\n--------\n\nZhon includes the following commonly-used constants:\n\n* CJK characters and radicals\n* Chinese punctuation marks\n* Chinese sentence regular expression pattern\n* Pinyin vowels, consonants, lowercase, uppercase, and punctuation\n* Pinyin syllable, word, and sentence regular expression patterns\n* Zhuyin characters and marks\n* Zhuyin syllable regular expression pattern\n* CC-CEDICT characters\n\nGetting Started\n---------------\n\n* `Install Zhon <https://tsroten.github.io/zhon/installation.html>`_\n* `Learn how to use Zhon <https://tsroten.github.io/zhon/api.html>`_\n* `Contribute <https://github.com/tsroten/zhon/blob/develop/CONTRIBUTING.rst>`_ documentation, code, or feedback\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Zhon provides constants used in Chinese text processing.",
    "version": "2.0.2",
    "project_urls": {
        "Changes": "https://tsroten.github.io/zhon/history.html",
        "Documentation": "https://tsroten.github.io/zhon",
        "Issue Tracker": "https://github.com/tsroten/zhon/issues",
        "Source Code": "https://github.com/tsroten/zhon"
    },
    "split_keywords": [
        "cc-cedict",
        "cedict",
        "characters",
        "chinese",
        "cjk",
        "han",
        "hanzi",
        "mandarin",
        "pinyin",
        "punctuation",
        "radicals",
        "segmentation",
        "simplified",
        "tokenization",
        "traditional",
        "unicode",
        "zhuyin"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cfe1fedce8230b9f4b07d34f2a25ea5f08071712ea512f959d831f32d257aee9",
                "md5": "1abb6819c657b0d3b0250fedb1624c48",
                "sha256": "e868e8308766e04866eacf37e8cf054a089d4b07cac62179b03f90a80757afe6"
            },
            "downloads": -1,
            "filename": "zhon-2.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1abb6819c657b0d3b0250fedb1624c48",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 83983,
            "upload_time": "2023-06-27T10:45:06",
            "upload_time_iso_8601": "2023-06-27T10:45:06.755073Z",
            "url": "https://files.pythonhosted.org/packages/cf/e1/fedce8230b9f4b07d34f2a25ea5f08071712ea512f959d831f32d257aee9/zhon-2.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cfda1ff0761d6c0d2fca7f19e65d19e960354dfe6cbc1664041e3c3e711d757a",
                "md5": "676494d53806a747173643e87837b126",
                "sha256": "c834df6b1b182f7e973e796ded80ed1f61f271fd25f6b0dc0c44f7c4ea467184"
            },
            "downloads": -1,
            "filename": "zhon-2.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "676494d53806a747173643e87837b126",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 84497,
            "upload_time": "2023-06-27T10:45:04",
            "upload_time_iso_8601": "2023-06-27T10:45:04.791729Z",
            "url": "https://files.pythonhosted.org/packages/cf/da/1ff0761d6c0d2fca7f19e65d19e960354dfe6cbc1664041e3c3e711d757a/zhon-2.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-27 10:45:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tsroten",
    "github_project": "zhon",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "zhon"
}
        
Elapsed time: 0.08416s