{ "info": { "author": "leafcoder", "author_email": "leafcoder@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "cpinyin\n=========\n\nRewrite `lxneng`'s `xpinyin` by cython since by commit `3599c101f659bb7cfbc7e5c5c5684206e4fab5f9 `.\n\nThe interfaces are completely consistent and can be seamlessly switched with `xpinyin`;\n\nInstall\n--------\n\n::\n\n pip install cpinyin\n\nUsage\n------\n\nReplace xpinyin.Pinyin with cpinyin.Pinyin\n\n::\n\n >>> import cpinyin\n >>> cpinyin.install()\n >>> from xpinyin import Pinyin\n >>> p = Pinyin()\n >>> p.get_pinyin(u\"\u4e0a\u6d77\")\n 'shang-hai'\n\nConsistent with the `xpinyin` Api.\n\n::\n\n >>> from cpinyin import Pinyin\n >>> p = Pinyin()\n >>> # default splitter is `-`\n >>> p.get_pinyin(u\"\u4e0a\u6d77\")\n 'shang-hai'\n >>> # show tone marks\n >>> p.get_pinyin(u\"\u4e0a\u6d77\", tone_marks=u'marks')\n 'sh\u00e0ng-h\u01cei'\n >>> p.get_pinyin(u\"\u4e0a\u6d77\", tone_marks=u'numbers')\n >>> 'shang4-hai3'\n >>> # remove splitter\n >>> p.get_pinyin(u\"\u4e0a\u6d77\", u'')\n 'shanghai'\n >>> # set splitter as whitespace\n >>> p.get_pinyin(u\"\u4e0a\u6d77\", u' ')\n 'shang hai'\n >>> p.get_initial(u\"\u4e0a\")\n 'S'\n >>> p.get_initials(u\"\u4e0a\u6d77\")\n 'S-H'\n >>> p.get_initials(u\"\u4e0a\u6d77\", u'')\n 'SH'\n >>> p.get_initials(u\"\u4e0a\u6d77\", u' ')\n 'S H'\n \nPlease enter Chinese characters encoding by utf8.\n\n >>> wordvalue = '\u4e2d\u56fd'\n >>> wordvalue= unicode(wordvalue, 'utf-8')\n >>> s = p.get_initials(wordvalue, u'').lower()\n 'zg'\n\n\n.. _lxneng: https://github.com/lxneng\n.. _xpinyin: https://github.com/lxneng/xpinyin", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/leafcoder/cpinyin", "keywords": "pinyin xpinyin cpinyin", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "cpinyin", "package_url": "https://pypi.org/project/cpinyin/", "platform": "", "project_url": "https://pypi.org/project/cpinyin/", "project_urls": { "Homepage": "https://github.com/leafcoder/cpinyin" }, "release_url": "https://pypi.org/project/cpinyin/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Rewrite lxneng's xpinyin by cython", "version": "0.1.2" }, "last_serial": 5905613, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "847ebcf77eb93fc46ff019e51a4e449b", "sha256": "703bec7e9a65353ca158a100e3a456a08b6b47a30a36322e06f51931e7e10be9" }, "downloads": -1, "filename": "cpinyin-0.1.2.tar.gz", "has_sig": false, "md5_digest": "847ebcf77eb93fc46ff019e51a4e449b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 128559, "upload_time": "2019-09-30T08:45:57", "url": "https://files.pythonhosted.org/packages/10/4f/aad2bcc062bb94a69d60ea8385172bc157254dcb964a90084a6d9b0f0fa1/cpinyin-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "847ebcf77eb93fc46ff019e51a4e449b", "sha256": "703bec7e9a65353ca158a100e3a456a08b6b47a30a36322e06f51931e7e10be9" }, "downloads": -1, "filename": "cpinyin-0.1.2.tar.gz", "has_sig": false, "md5_digest": "847ebcf77eb93fc46ff019e51a4e449b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 128559, "upload_time": "2019-09-30T08:45:57", "url": "https://files.pythonhosted.org/packages/10/4f/aad2bcc062bb94a69d60ea8385172bc157254dcb964a90084a6d9b0f0fa1/cpinyin-0.1.2.tar.gz" } ] }