{ "info": { "author": "Eric Lo", "author_email": "liuguangyuan0532@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": "ypinyin\n==========\n\n.. image:: https://img.shields.io/travis/liuguangyuan/ypinyin.svg\n :target: https://travis-ci.org/liuguangyuan/ypinyin\n\n.. image:: https://img.shields.io/pypi/v/ypinyin.svg\n :target: https://pypi.python.org/pypi/ypinyin/\n\n.. image:: https://img.shields.io/pypi/dm/ypinyin.svg\n :target: https://pypi.python.org/pypi/ypinyin/\n\ntranslate chinese hanzi to pinyin by python, inspired by flyerhzm\u2019s\n`chinese\\_pinyin`_ gem\n\nInstall\n----------\n\n::\n\n pip install ypinyin\n\n\nUsage\n-----\n\n::\n\n >>> from ypinyin 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\", show_tone_marks=True)\n 'sh\u00e0ng-h\u01cei'\n >>> # remove splitter\n >>> p.get_pinyin(u\"\u4e0a\u6d77\", '')\n 'shanghai'\n >>> # set splitter as whitespace\n >>> p.get_pinyin(u\"\u4e0a\u6d77\", ' ')\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 \n \u5982\u679c\u65b9\u6cd5\u4e2d\u4f20\u5165\u53d8\u91cf\uff0c\u90a3\u4e48\u76f4\u63a5\u52a0\u524d\u7f00\u662f\u4e0d\u53ef\u4ee5\u4e86\u3002\u800c\u662f\u8981\u5c06\u53d8\u91cf\u8f6c\u4e3autf-8\u7f16\u7801\uff1a\n >>> wordvalue = '\u4e2d\u56fd'\n >>> wordvalue= unicode(wordvalue,'utf-8')\n >>> s = p.get_initials(wordvalue, u'').lower()\n 'zg'\n \n\n\u8bf7\u8f93\u5165utf8\u7f16\u7801\u6c49\u5b57\n\n\n\n.. _chinese\\_pinyin: https://github.com/flyerhzm/chinese_pinyin\n\n\nChangelog\n=========\n\n\n0.5.5 - Feb. 28, 2016\n----------------------\n- add a new staticmethod which can convert pinyin to upper, lower or capitalize.\n https://github.com/liuguangyuan/ypinyin/pull/28\n\n- Removed extraneous \"!\" being appended to non 'a' vowel replacements when show_tone_marks=True; also added simple unitest.main() for non-nose users\n https://github.com/liuguangyuan/ypinyin/pull/30\n\n\n0.5.4 - Dec. 14, 2015\n----------------------\n\n- replace open() calls with io.open() for Python 3 compatibility,\n fix `UnicodeDecodeError`\n- change \\u730E \u730e to LIE4\n- improve readme\n\n\n0.5.3 - Dec. 25, 2014\n----------------------\n\n- adjust default pinyin for character '\u4ec0' and '\u4e48', \u4ec0\u4e48 => 'sh\u00e9n-me'\n\n\n0.5.2 - Jul. 6, 2014\n----------------------\n\n- \u4fee\u590d\u4e00\u4e9b\u5e38\u7528\u5b57\u7684\u62fc\u97f3\u6807\u6ce8\n\n0.4.9 - Oct. 25, 2013\n----------------------\n\n- change README and get_initials; add get_initial\n [tangsty]\n\n\n0.4.8 - Jun. 16, 2013\n----------------------\n\n- change README and get_initials; add get_initial\n [tangsty]\n\n- add download status image to README.rst\n [liuguangyuan]\n\n- add travis status image to README.rst\n [liuguangyuan]\n\n- add .travis.yml\n [liuguangyuan]\n\n- \u6dfb\u52a0\u6d4b\u8bd5\n [liuguangyuan]\n\n- \u89e3\u51b3\u7ffb\u8bd1\u4e2d\u82f1\u6587\u6df7\u5408\u53e5\u5b50\u95ee\u9898\n [liuguangyuan]\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/liuguangyuan0532/ypinyin", "keywords": "pinyin", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "ypinyin", "package_url": "https://pypi.org/project/ypinyin/", "platform": "", "project_url": "https://pypi.org/project/ypinyin/", "project_urls": { "Homepage": "https://github.com/liuguangyuan0532/ypinyin" }, "release_url": "https://pypi.org/project/ypinyin/0.5.6/", "requires_dist": null, "requires_python": "", "summary": "translate chinese hanzi to pinyin by python", "version": "0.5.6" }, "last_serial": 4127654, "releases": { "0.5.6": [ { "comment_text": "", "digests": { "md5": "7e7c6c682ce556963e6fe2a2afcddd1b", "sha256": "82f12bf9cefc7c74a6f271407858a4cd5ada24a260835e3746e0235ab5565cb6" }, "downloads": -1, "filename": "ypinyin-0.5.6.tar.gz", "has_sig": false, "md5_digest": "7e7c6c682ce556963e6fe2a2afcddd1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 129197, "upload_time": "2018-08-02T08:07:53", "url": "https://files.pythonhosted.org/packages/f6/3a/6250aa225bb7f204bdf59e4bcf8c7c719857b8270191546394af8ea21ca5/ypinyin-0.5.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7e7c6c682ce556963e6fe2a2afcddd1b", "sha256": "82f12bf9cefc7c74a6f271407858a4cd5ada24a260835e3746e0235ab5565cb6" }, "downloads": -1, "filename": "ypinyin-0.5.6.tar.gz", "has_sig": false, "md5_digest": "7e7c6c682ce556963e6fe2a2afcddd1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 129197, "upload_time": "2018-08-02T08:07:53", "url": "https://files.pythonhosted.org/packages/f6/3a/6250aa225bb7f204bdf59e4bcf8c7c719857b8270191546394af8ea21ca5/ypinyin-0.5.6.tar.gz" } ] }