{ "info": { "author": "Eric Lo", "author_email": "lxneng@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": "xpinyin\n==========\n\n.. image:: https://img.shields.io/travis/lxneng/xpinyin.svg\n :target: https://travis-ci.org/lxneng/xpinyin\n\n.. image:: https://img.shields.io/pypi/v/xpinyin.svg\n :target: https://pypi.python.org/pypi/xpinyin/\n\n.. image:: https://img.shields.io/pypi/dm/xpinyin.svg\n :target: https://pypi.python.org/pypi/xpinyin/\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 xpinyin\n\n\nUsage\n-----\n\n::\n\n >>> from xpinyin 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='marks')\n 'sh\u00e0ng-h\u01cei'\n >>> p.get_pinyin(u\"\u4e0a\u6d77\", tone_marks='numbers')\n >>> 'shang4-hai3'\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.6 - Oct. 15, 2018\n----------------------\n- add tones as numbers support.\n https://github.com/lxneng/xpinyin/pull/42\n- fix tests\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/lxneng/xpinyin/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/lxneng/xpinyin/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 [lxneng]\n\n- add travis status image to README.rst\n [lxneng]\n\n- add .travis.yml\n [lxneng]\n\n- \u6dfb\u52a0\u6d4b\u8bd5\n [lxneng]\n\n- \u89e3\u51b3\u7ffb\u8bd1\u4e2d\u82f1\u6587\u6df7\u5408\u53e5\u5b50\u95ee\u9898\n [lxneng]\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lxneng/xpinyin", "keywords": "pinyin", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "xpinyin", "package_url": "https://pypi.org/project/xpinyin/", "platform": "", "project_url": "https://pypi.org/project/xpinyin/", "project_urls": { "Homepage": "https://github.com/lxneng/xpinyin" }, "release_url": "https://pypi.org/project/xpinyin/0.5.6/", "requires_dist": null, "requires_python": "", "summary": "translate chinese hanzi to pinyin by python", "version": "0.5.6" }, "last_serial": 4376776, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "eeddac37d496a31a25a611ae3e26a27f", "sha256": "0991d9ce7f6fc4232a5f1dd8d9ba5f7a1ee1fa0df43dc63e0bef5d4fc6595414" }, "downloads": -1, "filename": "xpinyin-0.2.tar.gz", "has_sig": false, "md5_digest": "eeddac37d496a31a25a611ae3e26a27f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124639, "upload_time": "2011-10-27T05:52:03", "url": "https://files.pythonhosted.org/packages/46/52/d7123df160c39970f98a099e3077b50b49d20973c10db63c6284e931c6ee/xpinyin-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "92b4bef9368324cbc41fee13b27a5c71", "sha256": "2b3664159a6d3e494ddc21df2bafd08b4e9d9caa34e109765646ce898c9de6d8" }, "downloads": -1, "filename": "xpinyin-0.3.tar.gz", "has_sig": false, "md5_digest": "92b4bef9368324cbc41fee13b27a5c71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124777, "upload_time": "2011-11-22T15:56:15", "url": "https://files.pythonhosted.org/packages/94/67/b0dd0fcb0f910dd3b4ff9964f692fdfb0855d33016047e9c15e9f9c922df/xpinyin-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "077626f253e4d84c779006a94a4ab642", "sha256": "be8c2fa18918bed545ecd1cb4c46c3d0bf14f8bb0a99b570fe5ccfdc1f6f7182" }, "downloads": -1, "filename": "xpinyin-0.4.tar.gz", "has_sig": false, "md5_digest": "077626f253e4d84c779006a94a4ab642", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125155, "upload_time": "2011-11-22T16:08:38", "url": "https://files.pythonhosted.org/packages/c5/26/6de20f9faf929e5964e961023c4e1b8d1eb5549c09e17a19826e8846461d/xpinyin-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "db92ce41110ab81487842f0a2bc92517", "sha256": "ed944cd8fe1a583ea11a3ab22f440de97bdfbab63a74f620e9ec8d495c72ad66" }, "downloads": -1, "filename": "xpinyin-0.4.1.tar.gz", "has_sig": false, "md5_digest": "db92ce41110ab81487842f0a2bc92517", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125201, "upload_time": "2011-12-16T04:25:09", "url": "https://files.pythonhosted.org/packages/62/54/65ca79a68ef3309e20e03f71d2563965b49824e3b3aa2ff15ecc11fdef2b/xpinyin-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "9f6bc5639fa7dd8fd3a9a2970c940226", "sha256": "6ee0ad0da41e51c45ab4859bdcf6e537bee2c6ab1e6c5a347f78c1023ea41946" }, "downloads": -1, "filename": "xpinyin-0.4.2.tar.gz", "has_sig": false, "md5_digest": "9f6bc5639fa7dd8fd3a9a2970c940226", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125235, "upload_time": "2012-06-12T10:25:43", "url": "https://files.pythonhosted.org/packages/69/85/5ea8c91350d5349c64b57131a65f581d21e6affcc5585e6e5d4874fabd7a/xpinyin-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "8176f7a9987fd11dd47bf37fbf3e6da5", "sha256": "c48be8e958f1e475fb88527582583f5d93d7739d50ac7d97fa519ac9c1c2a794" }, "downloads": -1, "filename": "xpinyin-0.4.3.tar.gz", "has_sig": false, "md5_digest": "8176f7a9987fd11dd47bf37fbf3e6da5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124997, "upload_time": "2012-07-12T05:34:22", "url": "https://files.pythonhosted.org/packages/83/3e/cafa55c3631aa6f4d6cde41c0f68341eef969ad70080bebfae4fc47a9da0/xpinyin-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "9e77f3fc16a124d7773aa4688be2c524", "sha256": "41d22a5fabf23c58df268a09c9b15a81af0bba92b6216d2c4337f4567cfc39b2" }, "downloads": -1, "filename": "xpinyin-0.4.4.tar.gz", "has_sig": false, "md5_digest": "9e77f3fc16a124d7773aa4688be2c524", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125170, "upload_time": "2012-07-15T16:19:48", "url": "https://files.pythonhosted.org/packages/ce/ac/3a142c018cc0e517c58f2dd235f8abc2f02bbfb91e03c26d7f73b4101a5e/xpinyin-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "a6c7ae9f64dd711e622821d96060be8d", "sha256": "03443ee828da465d74450d344c1575b6c02fd46daffd1d15f41232093d438a51" }, "downloads": -1, "filename": "xpinyin-0.4.5.tar.gz", "has_sig": false, "md5_digest": "a6c7ae9f64dd711e622821d96060be8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124952, "upload_time": "2012-08-30T02:50:03", "url": "https://files.pythonhosted.org/packages/ef/7e/afddd7c9ed6abde9256e21272f205aefd7c0d6edd9dffd628e9492368087/xpinyin-0.4.5.tar.gz" } ], "0.4.6": [ { "comment_text": "", "digests": { "md5": "60f95278fc667176187cec3196b53478", "sha256": "e1a2de867ff1ef516a3218448fdc9078058b5f6e36e46f65d97afc413d9edfa7" }, "downloads": -1, "filename": "xpinyin-0.4.6.tar.gz", "has_sig": false, "md5_digest": "60f95278fc667176187cec3196b53478", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125160, "upload_time": "2013-05-09T08:50:46", "url": "https://files.pythonhosted.org/packages/df/68/9748bd38f69f31d388a88073e2d0a973b69f5351f546f5ce9252cd6fd02b/xpinyin-0.4.6.tar.gz" } ], "0.4.7": [ { "comment_text": "", "digests": { "md5": "46f244c79e7857934cd3726f685e5622", "sha256": "6cfaa2647a525579ab2ce575f8e953200cbd1f01bdb641ffbd97cfd6c2fb850f" }, "downloads": -1, "filename": "xpinyin-0.4.7.tar.gz", "has_sig": false, "md5_digest": "46f244c79e7857934cd3726f685e5622", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125154, "upload_time": "2013-05-27T02:36:39", "url": "https://files.pythonhosted.org/packages/09/15/4d91d020179aff7890ee5db84db147a3946c906864d5d3c44cfa5d98982a/xpinyin-0.4.7.tar.gz" } ], "0.4.8": [ { "comment_text": "", "digests": { "md5": "ac9422da509f2d7db002c37c3a7739cf", "sha256": "5b9819a33052853ca27edce05584bafa5a4f82c046f99c004c6a1d000c926867" }, "downloads": -1, "filename": "xpinyin-0.4.8.tar.gz", "has_sig": false, "md5_digest": "ac9422da509f2d7db002c37c3a7739cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126384, "upload_time": "2013-06-16T01:16:59", "url": "https://files.pythonhosted.org/packages/16/82/9b8da34aaf0b5fa77c9de2b545d996e4055cc880ddebe5dd0a0a3d7f8fc3/xpinyin-0.4.8.tar.gz" } ], "0.4.9": [ { "comment_text": "", "digests": { "md5": "b21048126a13b05c062117a4f405a167", "sha256": "a0b5379803693bafa29bd905802c498e091f8c1adbc7135637814ea8378b2885" }, "downloads": -1, "filename": "xpinyin-0.4.9.tar.gz", "has_sig": false, "md5_digest": "b21048126a13b05c062117a4f405a167", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126926, "upload_time": "2013-10-25T08:49:45", "url": "https://files.pythonhosted.org/packages/15/18/9f7bd36b62a456a25c684e188ea4d37732abd7b530617570268c7c78e44b/xpinyin-0.4.9.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "b1663a325ae44b73fcc31a2c71c9f343", "sha256": "2c8b394a9e439e63fb69fd49f6bea825dfb55b029acd2862cbab8059211c773a" }, "downloads": -1, "filename": "xpinyin-0.5.0.tar.gz", "has_sig": false, "md5_digest": "b1663a325ae44b73fcc31a2c71c9f343", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 127002, "upload_time": "2013-10-25T08:55:33", "url": "https://files.pythonhosted.org/packages/08/31/97213b6bbfc16b2f6aa4f8f488a1a3c373ead30cda6403ee6ed9f22201a8/xpinyin-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "1fe3859fb7ad4c32b1e39c0d8e9996db", "sha256": "913fed20152d1092208c8a1fc991ec66e0dff682f2d58a21692bfcf4df857a36" }, "downloads": -1, "filename": "xpinyin-0.5.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1fe3859fb7ad4c32b1e39c0d8e9996db", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 127975, "upload_time": "2014-07-10T06:11:17", "url": "https://files.pythonhosted.org/packages/ce/3b/d368262ff249fbccee307dd2de6b00b34b529e831d9ca2d977a44c2bd92b/xpinyin-0.5.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "243eac50b069cb84a6af86c86cdf1587", "sha256": "9f0d9e34b0c49827abba432ab8d863ad478a60b7f5fb2f3644ce517283686514" }, "downloads": -1, "filename": "xpinyin-0.5.1.tar.gz", "has_sig": false, "md5_digest": "243eac50b069cb84a6af86c86cdf1587", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 127881, "upload_time": "2014-07-06T06:56:08", "url": "https://files.pythonhosted.org/packages/b4/bf/a9e24eebdb2ee07714fe09fd0de0262012f44b17abb9e2b838030e192ef2/xpinyin-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "04ed024589da5d1a9b506c24708b4cc7", "sha256": "55f142a88fe54f23f7296b98a906a6305cd9298db76266631f7680c4981020f7" }, "downloads": -1, "filename": "xpinyin-0.5.2-py2-none-any.whl", "has_sig": false, "md5_digest": "04ed024589da5d1a9b506c24708b4cc7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 128054, "upload_time": "2014-09-22T06:41:25", "url": "https://files.pythonhosted.org/packages/9c/1e/3778afefcb186b0e2b6385e4bbaea1f0ebebd4040f09abed9586a4cf0d05/xpinyin-0.5.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "750e1e8fb4a4b430016184f605f45b37", "sha256": "426072e2d2ffd8c190fa87f7f751c16a7ccacbcd2d1b9d4c3c7eb3c08326235f" }, "downloads": -1, "filename": "xpinyin-0.5.2.tar.gz", "has_sig": false, "md5_digest": "750e1e8fb4a4b430016184f605f45b37", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 128025, "upload_time": "2014-09-22T06:41:22", "url": "https://files.pythonhosted.org/packages/d8/d1/183eec5094ca52ea713aaaad539675c99977b04bdb811f2bbfffc517c99a/xpinyin-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "5aec60d3eba8aa75c558a58564649889", "sha256": "03f5122bb3686282cd9e0f8ebd6293eaa1b255672a58577c701d333598947f34" }, "downloads": -1, "filename": "xpinyin-0.5.3.tar.gz", "has_sig": false, "md5_digest": "5aec60d3eba8aa75c558a58564649889", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 128159, "upload_time": "2014-12-25T02:11:19", "url": "https://files.pythonhosted.org/packages/e1/c3/33b2391557d605d74473431023d3a75c60f13037ea0604c478519f2da8f2/xpinyin-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "522f413169ec7b3c9c7feb803fc1910f", "sha256": "af72a6e7fda14d328726c85d1e525e73f4b7b7dbd6457d9371a38ecc535962bb" }, "downloads": -1, "filename": "xpinyin-0.5.4.tar.gz", "has_sig": false, "md5_digest": "522f413169ec7b3c9c7feb803fc1910f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 129360, "upload_time": "2015-12-14T14:27:31", "url": "https://files.pythonhosted.org/packages/fb/4b/104220d3a56283605113a0b136b33503d0213f156d84e6003892a7591031/xpinyin-0.5.4.tar.gz" } ], "0.5.5": [ { "comment_text": "", "digests": { "md5": "c3eccc26a4f4e01fdd0b183c4353888f", "sha256": "e39b1a5c6724c308902fd4fc7fe70d6c10c82217d05c367e8ac041dd65dffdf5" }, "downloads": -1, "filename": "xpinyin-0.5.5.tar.gz", "has_sig": false, "md5_digest": "c3eccc26a4f4e01fdd0b183c4353888f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 127872, "upload_time": "2017-02-28T11:05:52", "url": "https://files.pythonhosted.org/packages/40/6b/eecbebf5a86dbe2f2fa864355190879741e24ad72ee96849a46a200c1eaa/xpinyin-0.5.5.tar.gz" } ], "0.5.6": [ { "comment_text": "", "digests": { "md5": "961e9a3d6a377e5481ad46f000ff3590", "sha256": "e88f63d10185373ba484966af36872bfbdf56ba271235c12ff0ac4963eb0168f" }, "downloads": -1, "filename": "xpinyin-0.5.6.tar.gz", "has_sig": false, "md5_digest": "961e9a3d6a377e5481ad46f000ff3590", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 128786, "upload_time": "2018-10-15T08:53:55", "url": "https://files.pythonhosted.org/packages/91/53/fe8d9f1cda41bc8269dcf545b26f451ca9f1b8ee6d3aea9f8b726b4517b8/xpinyin-0.5.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "961e9a3d6a377e5481ad46f000ff3590", "sha256": "e88f63d10185373ba484966af36872bfbdf56ba271235c12ff0ac4963eb0168f" }, "downloads": -1, "filename": "xpinyin-0.5.6.tar.gz", "has_sig": false, "md5_digest": "961e9a3d6a377e5481ad46f000ff3590", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 128786, "upload_time": "2018-10-15T08:53:55", "url": "https://files.pythonhosted.org/packages/91/53/fe8d9f1cda41bc8269dcf545b26f451ca9f1b8ee6d3aea9f8b726b4517b8/xpinyin-0.5.6.tar.gz" } ] }