{ "info": { "author": "Mu Yang", "author_email": "emfomy@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: Free for non-commercial use", "Natural Language :: Chinese (Traditional)", "Operating System :: POSIX :: Linux", "Programming Language :: Cython", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Introduction\n============\n\nGit\n---\n\nhttps://github.com/ckiplab/ckipnlp\n\n|GitHub Version| |GitHub Release| |GitHub Issues|\n\n.. |GitHub Version| image:: https://img.shields.io/github/v/release/ckiplab/ckipnlp.svg?maxAge=3600\n :target: https://github.com/ckiplab/ckipnlp/releases\n\n.. |GitHub License| image:: https://img.shields.io/github/license/ckiplab/ckipnlp.svg?maxAge=3600\n :target: https://github.com/ckiplab/ckipnlp/blob/master/LICENSE\n\n.. |GitHub Release| image:: https://img.shields.io/github/release-date/ckiplab/ckipnlp.svg?maxAge=3600\n\n.. |GitHub Downloads| image:: https://img.shields.io/github/downloads/ckiplab/ckipnlp/total.svg?maxAge=3600\n :target: https://github.com/ckiplab/ckipnlp/releases/latest\n\n.. |GitHub Issues| image:: https://img.shields.io/github/issues/ckiplab/ckipnlp.svg?maxAge=3600\n :target: https://github.com/ckiplab/ckipnlp/issues\n\n.. |GitHub Forks| image:: https://img.shields.io/github/forks/ckiplab/ckipnlp.svg?style=social&label=Fork&maxAge=3600\n\n.. |GitHub Stars| image:: https://img.shields.io/github/stars/ckiplab/ckipnlp.svg?style=social&label=Star&maxAge=3600\n\n.. |GitHub Watchers| image:: https://img.shields.io/github/watchers/ckiplab/ckipnlp.svg?style=social&label=Watch&maxAge=3600\n\nPyPI\n----\n\nhttps://pypi.org/project/ckipnlp\n\n|PyPI Version| |PyPI License| |PyPI Downloads| |PyPI Python| |PyPI Implementation| |PyPI Status|\n\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/ckipnlp.svg?maxAge=3600\n :target: https://pypi.org/project/ckipnlp\n\n.. |PyPI License| image:: https://img.shields.io/pypi/l/ckipnlp.svg?maxAge=3600\n :target: https://github.com/ckiplab/ckipnlp/blob/master/LICENSE\n\n.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/ckipnlp.svg?maxAge=3600\n :target: https://pypi.org/project/ckipnlp#files\n\n.. |PyPI Python| image:: https://img.shields.io/pypi/pyversions/ckipnlp.svg?maxAge=3600\n\n.. |PyPI Implementation| image:: https://img.shields.io/pypi/implementation/ckipnlp.svg?maxAge=3600\n\n.. |PyPI Format| image:: https://img.shields.io/pypi/format/ckipnlp.svg?maxAge=3600\n\n.. |PyPI Status| image:: https://img.shields.io/pypi/status/ckipnlp.svg?maxAge=3600\n\nDocumentation\n-------------\n\nhttp://ckipnlp.readthedocs.io/\n\n|ReadTheDocs Home|\n\n.. |ReadTheDocs Home| image:: https://img.shields.io/website/https/ckipnlp.readthedocs.io.svg?maxAge=3600&up_message=online&down_message=offline\n :target: http://ckipnlp.readthedocs.io\n\nAuthor\n------\n\n* Mu Yang \n\nRequirements\n------------\n\n* `Python `_ 3.5+\n* `Cython `_ 0.29+\n\n.. note::\n For Python 2 users, please use `PyCkip 0.4.2 `_ instead.\n\nCkipWs (Optional)\n^^^^^^^^^^^^^^^^^\n\n* `CKIP Word Segmentation `_ Linux version 20190524+\n\nCkipParser (Optional)\n^^^^^^^^^^^^^^^^^^^^^\n\n* `CKIP Parser `_ Linux version 20190506+ (20190725+ recommended)\n\nInstallation\n============\n\nDenote ```` as the root path of CKIPWS Linux Version, and ```` as the root path of CKIP-Parser Linux Version.\n\nInstall Using Pip\n-----------------\n\n.. code-block:: bash\n\n pip install --upgrade ckipnlp\n pip install --no-deps --force-reinstall --upgrade ckipnlp \\\n --install-option='--ws' \\\n --install-option='--ws-dir=' \\\n --install-option='--parser' \\\n --install-option='--parser-dir='\n\nIgnore ws/parser options if one doesn't have CKIPWS/CKIP-Parser.\n\nInstallation Options\n--------------------\n\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| Option | Detail | Default Value |\n+===============================================+=======================================+===============================+\n| ``--[no-]ws`` | Enable/disable CKIPWS. | False |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--[no-]parser`` | Enable/disable CKIP-Parser. | False |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--ws-dir=`` | CKIPWS root directory. | |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--ws-lib-dir=`` | CKIPWS libraries directory | ``/lib`` |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--ws-share-dir=`` | CKIPWS share directory | ```` |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--parser-dir=`` | CKIP-Parser root directory. | |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--parser-lib-dir=`` | CKIP-Parser libraries directory | ``/lib`` |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--parser-share-dir=`` | CKIP-Parser share directory | ```` |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--data2-dir=`` | \"Data2\" directory | ``/Data2`` |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--rule-dir=`` | \"Rule\" directory | ``/Rule`` |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n| ``--rdb-dir=`` | \"RDB\" directory | ``/RDB`` |\n+-----------------------------------------------+---------------------------------------+-------------------------------+\n\nUsage\n=====\n\nSee http://ckipnlp.readthedocs.io/ for API details.\n\nCKIPWS\n------\n\n.. code-block:: python\n\n import ckipnlp.ws\n print(ckipnlp.__name__, ckipnlp.__version__)\n\n ws = ckipnlp.ws.CkipWs(logger=False)\n print(ws('\u4e2d\u6587\u5b57\u5594'))\n for l in ws.apply_list(['\u4e2d\u6587\u5b57\u5594', '\u554a\u54c8\u54c8\u54c8']): print(l)\n\n ws.apply_file(ifile='sample/sample.txt', ofile='output/sample.tag', uwfile='output/sample.uw')\n with open('output/sample.tag') as fin:\n print(fin.read())\n with open('output/sample.uw') as fin:\n print(fin.read())\n\n\nCKIP-Parser\n-----------\n\n.. code-block:: python\n\n import ckipnlp.parser\n print(ckipnlp.__name__, ckipnlp.__version__)\n\n ps = ckipnlp.parser.CkipParser(logger=False)\n print(ps('\u4e2d\u6587\u5b57\u5594'))\n for l in ps.apply_list(['\u4e2d\u6587\u5b57\u5594', '\u554a\u54c8\u54c8\u54c8']): print(l)\n\n ps = ckipnlp.parser.CkipParser(logger=False)\n print(ps('\u4e2d\u6587\u5b57\u5594'))\n for l in ps.apply_list(['\u4e2d\u6587\u5b57\u5594', '\u554a\u54c8\u54c8\u54c8']): print(l)\n ps.apply_file(ifile='sample/sample.txt', ofile='output/sample.tree')\n with open('output/sample.tree') as fin:\n print(fin.read())\n\nUtilities\n---------\n\n.. code-block:: python\n\n import ckipnlp\n print(ckipnlp.__name__, ckipnlp.__version__)\n\n from ckipnlp.util.ws import *\n from ckipnlp.util.parser import *\n\n # Format CkipWs output\n ws_text = ['\u4e2d\u6587\u5b57(Na)\u3000\u5594(T)', '\u554a\u54c8(I)\u3000\u54c8\u54c8(D)']\n for text in ws_text: print(ckipnlp.util.ws.WsSentence.from_text(text))\n for text in ws_text: print(repr(ckipnlp.util.ws.WsSentence.from_text(text)))\n\n # Show CkipParser output as tree\n tree_text = 'S(theme:NP(property:N\u2027\u7684(head:Nhaa:\u6211|Head:DE:\u7684)|Head:Nad(DUMMY1:Nab:\u65e9\u9910|Head:Caa:\u548c|DUMMY2:Naa:\u5348\u9910))|quantity:Dab:\u90fd|Head:VC31:\u5403\u5b8c|aspect:Di:\u4e86)'\n tree = ParserTree.from_text(tree_text)\n tree.show()\n\n # Get dummies of node 5\n for node in tree.get_dummies(5): print(node)\n\n # Get heads of node 1\n for node in tree.get_heads(1): print(node)\n\n # Get relations\n for r in tree.get_relations(0): print(r)\n\n\nFAQ\n===\n\n.. warning::\n\n The CKIPWS throws \"``what(): locale::facet::_S_create_c_locale name not valid``\". What should I do?\n\nInstall locale data.\n\n.. code-block:: bash\n\n apt-get install locales-all\n\n.. warning::\n\n The CKIPParser throws \"``ImportError: libCKIPParser.so: cannot open shared object file: No such file or directory``\". What should I do?\n\nAdd below command to ``~/.bashrc``:\n\n.. code-block:: bash\n\n export LD_LIBRARY_PATH=/lib:$LD_LIBRARY_PATH\n\nLicense\n=======\n\n|CC BY-NC-SA 4.0|\n\nCopyright (c) 2018-2019 CKIP Lab under the `CC-BY-NC-SA 4.0 License `_. All rights reserved.\n\n.. |CC BY-NC-SA 4.0| image:: https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png\n :target: http://creativecommons.org/licenses/by-nc-sa/4.0/", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "https://ckipnlp.readthedocs.io/tarball/0.6.1.post0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://ckipnlp.readthedocs.io", "keywords": "", "license": "CC-BY-NC-SA 4.0", "maintainer": "", "maintainer_email": "", "name": "ckipnlp", "package_url": "https://pypi.org/project/ckipnlp/", "platform": "linux_x86_64", "project_url": "https://pypi.org/project/ckipnlp/", "project_urls": { "Download": "https://ckipnlp.readthedocs.io/tarball/0.6.1.post0", "Homepage": "https://ckipnlp.readthedocs.io" }, "release_url": "https://pypi.org/project/ckipnlp/0.6.1.post0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "CKIP CoreNLP Wrappers", "version": "0.6.1.post0" }, "last_serial": 5718804, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "d12accf7df4e3b5382fc6f40530e6c8a", "sha256": "fe1ac7f9d0b1edfe6308341fff3ddf3f7c165b989de1bde68bcbe2cbe2939c12" }, "downloads": -1, "filename": "ckipnlp-0.0.0.tar.gz", "has_sig": false, "md5_digest": "d12accf7df4e3b5382fc6f40530e6c8a", "packagetype": "sdist", "python_version": "source", "requires_python": "<3", "size": 738, "upload_time": "2019-07-24T02:43:10", "url": "https://files.pythonhosted.org/packages/03/19/3deea4100d44aed4f5031ee0a2db92ac3b4f54e0d90cdd6ec4e3906916ec/ckipnlp-0.0.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "4a9cbcc2aec1399cdd424e25a70c56e1", "sha256": "979ce44f9f03920b5215f6f1203623c92cc01bb704a06c261f2e0a27ba370216" }, "downloads": -1, "filename": "ckipnlp-0.5.0.tar.gz", "has_sig": false, "md5_digest": "4a9cbcc2aec1399cdd424e25a70c56e1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 13906, "upload_time": "2019-07-23T10:05:23", "url": "https://files.pythonhosted.org/packages/54/9a/202b74e4d9d786a4a9f719506295eec082a52c0fd655b3235af488f0e6e5/ckipnlp-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "04a05e3aff9a6f7ad7e794b4cfe21a38", "sha256": "53aaf206adabf97be3f17eb628a0a3dd293fa679130ca7655387ffa4d6e4c5db" }, "downloads": -1, "filename": "ckipnlp-0.5.1.tar.gz", "has_sig": false, "md5_digest": "04a05e3aff9a6f7ad7e794b4cfe21a38", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 15328, "upload_time": "2019-07-23T11:14:50", "url": "https://files.pythonhosted.org/packages/91/f9/5e49404341d0d96742341de113f9e1aaad48721240ab2d47a92abb747ed3/ckipnlp-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "c4270bbf5f79cdc57fad9b0d47834201", "sha256": "82793f13db179fb48faadb0eb774913a93e77bcac44ce1c20b3dbbe7b7f96517" }, "downloads": -1, "filename": "ckipnlp-0.5.2.tar.gz", "has_sig": false, "md5_digest": "c4270bbf5f79cdc57fad9b0d47834201", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 15525, "upload_time": "2019-07-25T04:55:45", "url": "https://files.pythonhosted.org/packages/ef/e5/680b18022d28220efd348d791bb8bd7f71069ed760ea51af59402015ec2b/ckipnlp-0.5.2.tar.gz" } ], "0.6.0.post1": [ { "comment_text": "", "digests": { "md5": "7d85934ff164e7662c448c0ba8bfae37", "sha256": "24393da6e16610a6e0ed9d301fc76043eaa10b853c2dfadb15c49927eef08228" }, "downloads": -1, "filename": "ckipnlp-0.6.0.post1.tar.gz", "has_sig": false, "md5_digest": "7d85934ff164e7662c448c0ba8bfae37", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 16193, "upload_time": "2019-07-27T15:07:00", "url": "https://files.pythonhosted.org/packages/4d/61/a898e51726dc2f1cedd753fdcb1e597e8665b33bf32044e45dd4ae5431bd/ckipnlp-0.6.0.post1.tar.gz" } ], "0.6.1.post0": [ { "comment_text": "", "digests": { "md5": "489501866a3e8d2086e6ec00243602c3", "sha256": "47ad5e61b858eb990ee46c4ce87f13cf97f882ec785d656c2d31eb839f7cd1ce" }, "downloads": -1, "filename": "ckipnlp-0.6.1.post0.tar.gz", "has_sig": false, "md5_digest": "489501866a3e8d2086e6ec00243602c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 16193, "upload_time": "2019-08-23T04:45:44", "url": "https://files.pythonhosted.org/packages/2f/12/6c3eede820021ef7490866de27f019f70f27696004ce9b5b3d09471614ee/ckipnlp-0.6.1.post0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "489501866a3e8d2086e6ec00243602c3", "sha256": "47ad5e61b858eb990ee46c4ce87f13cf97f882ec785d656c2d31eb839f7cd1ce" }, "downloads": -1, "filename": "ckipnlp-0.6.1.post0.tar.gz", "has_sig": false, "md5_digest": "489501866a3e8d2086e6ec00243602c3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 16193, "upload_time": "2019-08-23T04:45:44", "url": "https://files.pythonhosted.org/packages/2f/12/6c3eede820021ef7490866de27f019f70f27696004ce9b5b3d09471614ee/ckipnlp-0.6.1.post0.tar.gz" } ] }