{ "info": { "author": "Thomas Roten", "author_email": "thomas@roten.us", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Linguistic" ], "description": "================\nHanzi Identifier\n================\n\n.. image:: https://badge.fury.io/py/hanzidentifier.png\n :target: http://badge.fury.io/py/hanzidentifier\n \n.. image:: https://travis-ci.org/tsroten/hanzidentifier.png?branch=develop\n :target: https://travis-ci.org/tsroten/hanzidentifier\n\nHanzi Identifier is a simple Python module that identifies a string of text as \nhaving Simplified or Traditional characters.\n\n* GitHub: https://github.com/tsroten/hanzidentifier\n* Free software: MIT license\n\nAbout\n-----\n\nEasy-to-use helper functions for identifying strings:\n\n.. code:: python\n\n >>> import hanzidentifier\n >>> hanzidentifier.has_chinese('Hello my name is John.')\n False\n >>> hanzidentifier.is_simplified('John\u8bf4\uff1a\u4f60\u597d\uff01')\n True\n >>> hanzidentifier.is_traditional('John\u8aaa\uff1a\u4f60\u597d\uff01')\n True\n >>> hanzidentifier.has_chinese('Country in Simplified: \u56fd\u5bb6. Country in Traditional: \u570b\u5bb6.')\n True\n\nHere it is without the helper functions:\n\n.. code:: python\n\n >>> hanzidentifier.identify('Hello my name is Thomas.') is hanzidentifier.UNKNOWN\n True\n >>> hanzidentifier.identify('Thomas \u8bf4\uff1a\u4f60\u597d\uff01') is hanzidentifier.SIMPLIFIED\n True\n >>> hanzidentifier.identify('Thomas \u8aaa\uff1a\u4f60\u597d\uff01') is hanzidentifier.TRADITIONAL\n True\n >>> hanzidentifier.identify('\u4f60\u597d\uff01') is hanzidentifier.BOTH\n True\n >>> hanzidentifier.identify('Country in Simplified: \u56fd\u5bb6. Country in Traditional: \u570b\u5bb6.' ) is hanzidentifier.MIXED\n True\n\n``hanzidentifier.identify`` has five possible return values:\n\n* ``hanzidentifier.UNKNOWN``: there are no recognized Chinese characters in the string.\n* ``hanzidentifier.BOTH``: the string is compatible with both Simplified and Traditional character systems.\n* ``hanzidentifier.TRADITIONAL``: the string consists of Traditional characters.\n* ``hanzidentifier.SIMPLIFIED``: the string consists of Simplified characters.\n* ``hanzidentifier.MIXED``: the string consists of characters recognized solely as Traditional characters and also consists of characters recognized solely as Simplified characters.\n\nCharacters that aren't found in CC-CEDICT are ignored when determining a string's identity.\nHanzi Identifier uses the CC-CEDICT data provided by `Zhon `_ to identify Chinese characters.\n\nBecause the Traditional and Simplified Chinese character systems overlap, a\nstring containing Simplified characters could identify as\n``hanzidentifer.SIMPLIFIED`` or ``hanzidentifier.BOTH`` depending on if the\ncharacters are also Traditional characters.\n\nHanzi Identifier's functions accept and return unicode.\n\nGetting Started\n---------------\n\n* Install Hanzi Identifier: ``$ pip install hanzidentifier``\n* Report bugs and ask questions via `GitHub Issues `_\n* `Contribute features or bug fixes `_\n\n\nChange Log\n----------\n\nv1.0.2 (2015-08-06)\n~~~~~~~~~~~~~~~~~~~\n\n* New README format\n* Adds Travis CI support\n* Uses ``io.open()`` in ``setup.py``. Fixes #1.\n\nv1.0.1 (2014-04-14)\n~~~~~~~~~~~~~~~~~~~\n\n* Fixes URL typo.\n\nv1.0 (2014-04-12)\n~~~~~~~~~~~~~~~~~\n\nVersion 1.0 merges some changes from Dragon Mapper. It is not backwards compatible with\nthe previous versions of Hanzi Identifier (e.g. some of the constants are named differently).\n\n* Merges code from `Dragon Mapper `_ project.\n* Adds tox support.\n\nv0.1 (2013-04-24)\n~~~~~~~~~~~~~~~~~\n\n* Initial release.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tsroten/hanzidentifier", "keywords": "chinese,mandarin,hanzi,characters,simplified,traditional,identify,identification,cjk", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "hanzidentifier", "package_url": "https://pypi.org/project/hanzidentifier/", "platform": "any", "project_url": "https://pypi.org/project/hanzidentifier/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tsroten/hanzidentifier" }, "release_url": "https://pypi.org/project/hanzidentifier/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Python module that identifies Chinese text as Simplified or Traditional.", "version": "1.0.2" }, "last_serial": 1667488, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "2005e134fdd19cfd6145b0ce16228f9e", "sha256": "338f076f6d63aa59bd267992441417f3b28be02fc39c8039d58ce4f7723b2164" }, "downloads": -1, "filename": "hanzidentifier-1.0.1.tar.gz", "has_sig": true, "md5_digest": "2005e134fdd19cfd6145b0ce16228f9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4104, "upload_time": "2014-04-14T05:59:09", "url": "https://files.pythonhosted.org/packages/47/37/3ee76a064a98bb8b37dbae1b9a02e49b561452280448cefa4d21785541a2/hanzidentifier-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "7dfa853288a429878b225848b3bed8ed", "sha256": "793a298430aa9a9d6ab344dc0ca0ab4bd1161d88c7da941d6554571093003cba" }, "downloads": -1, "filename": "hanzidentifier-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7dfa853288a429878b225848b3bed8ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4381, "upload_time": "2015-08-06T20:44:18", "url": "https://files.pythonhosted.org/packages/48/f8/3903525d9f63de307dfcf311be64d43e6ab88aa175b6daa4d159d17b3933/hanzidentifier-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7dfa853288a429878b225848b3bed8ed", "sha256": "793a298430aa9a9d6ab344dc0ca0ab4bd1161d88c7da941d6554571093003cba" }, "downloads": -1, "filename": "hanzidentifier-1.0.2.tar.gz", "has_sig": false, "md5_digest": "7dfa853288a429878b225848b3bed8ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4381, "upload_time": "2015-08-06T20:44:18", "url": "https://files.pythonhosted.org/packages/48/f8/3903525d9f63de307dfcf311be64d43e6ab88aa175b6daa4d159d17b3933/hanzidentifier-1.0.2.tar.gz" } ] }