{ "info": { "author": "bung87,yeping zheng", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Natural Language :: Chinese (Simplified)", "Natural Language :: Chinese (Traditional)", "Operating System :: Unix", "Programming Language :: C++", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Linguistic" ], "description": "# cppjieba-py \n\n[![Build Status](https://travis-ci.org/bung87/cppjieba-py.svg?branch=master)](https://travis-ci.org/bung87/cppjieba-py)\n\ncppjieba-py \u662f [cppjieba](https://github.com/yanyiwu/cppjieba)\u7684 Python \u5c01\u88c5\u3002 \n\n\u7531\u4e8e\u53ea\u662f\u5bf9cppjieba\u7684\u63a5\u53e3\u8fdb\u884c\u7684\u5c01\u88c5\uff0c\u6240\u4ee5\u6267\u884c\u6548\u7387\u4e0a\u975e\u5e38\u63a5\u8fd1\u4e8e\u539fcppjieba\u3002 \n\n\u9879\u76ee\u4e3b\u8981\u5206\u4e3a\u4e24\u4e2a\u90e8\u5206**libcppjieba** \u4e3a cppjieba \u7684 python extension\uff0c \n**cppjieba_py** \u4e3a\u4f7f\u5f00\u53d1\u8005\u5e73\u6ed1\u8fc7\u6e21\u5230\u4f7f\u7528cppjieba-py\u800c\u4f5c\u7684 python package\u3002 \n\u5177\u4f53\u89c1[example.py](example.py)\u3002 \n\n### \u533a\u522b \n\n* \u539fjieba\u7684`.cut`\u65cf\u63a5\u53e3\u57fa\u672c\u90fd\u7531python\u7684`iter()`\u51fd\u6570\u5305\u88f9list\u7ed3\u679c\u6765\u5b9e\u73b0\u3002 \n* \u539fjieba\u7684`.set_*`\u65b9\u6cd5\u57fa\u672c\u90fd\u7531class\u4f20\u5165\u521d\u59cb\u5316\u7684\u53c2\u6570\u6765\u5b8c\u6210\u3002 \n* `.del_word` \u548c`.suggest_freq` cppjieba\u6ca1\u63d0\u4f9b\u3002 \n* `POSTokenizer.lcut` \u5728`Tokenizer.tag` \u4e0b\uff0c \u552f\u4e00\u4e00\u4e2a\u53ea\u63d0\u4f9b\u4e86list\u8fd4\u56de\u7c7b\u578b\u7684\u63a5\u53e3\u3002\n\n## \u5b89\u88c5 \n\n* pypi \n\n\t```pip install cppjieba-py``` \n\t\n\t\u6216\u8005\u4f60\u8bbe\u7f6e\u7684\u5b89\u88c5\u6e90\u5e76\u672a\u6536\u5f55\u672c\u9879\u76ee \n\n\t```pip install -i https://pypi.org/simple/ cppjieba-py``` \n\n* \u4ece\u53d1\u884c\u5305\u5b89\u88c5 \n\tsee [releases](https://github.com/bung87/cppjieba-py/releases) \n\n\t```pip install https://github.com/bung87/cppjieba-py/files//cppjieba_py-.tar.gz``` \n\n* \u4ece\u6e90\u4ee3\u7801\u5b89\u88c5\n\n\t```\n\t$ git clone --recursive https://github.com/bung87/cppjieba-py\n\t$ python setup.py install \n\t```\n\n\n## \u4f7f\u7528\n\n\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528 cppjieba-py \u8fdb\u884c\u5206\u8bcd\u7684\u4f8b\u5b50\n\n```python\n# -*- coding: utf-8 -*-\nimport cppjieba_py as jieba \n# or use defualt Tokenizer: jieba.cut \njieba_instance = Tokenizer()\nseg_list = jieba_instance.cut(\"\u6211\u6765\u5230\u5317\u4eac\u6e05\u534e\u5927\u5b66\",cut_all = True)\nprint(\"Full Mode: \" + \"/ \".join(seg_list)) # \u5168\u6a21\u5f0f\n\n\nseg_list = jieba_instance.cut(\"\u4ed6\u6765\u5230\u4e86\u7f51\u6613\u676d\u7814\u5927\u53a6\") # \u9ed8\u8ba4\u662f\u7cbe\u786e\u6a21\u5f0f\nprint(\", \".join(seg_list))\n\nseg_list = jieba_instance.cut_for_search(\n \"\u5c0f\u660e\u7855\u58eb\u6bd5\u4e1a\u4e8e\u4e2d\u56fd\u79d1\u5b66\u9662\u8ba1\u7b97\u6240\uff0c\u540e\u5728\u65e5\u672c\u4eac\u90fd\u5927\u5b66\u6df1\u9020\") # \u641c\u7d22\u5f15\u64ce\u6a21\u5f0f\nprint(\", \".join(seg_list))\n \n```\n\nfor more: [example.py](example.py) , [tests](tests)\n\n## \u6027\u80fd \n\n[performace_test/speed.py](performace_test/speed.py) \n\n\u6d4b\u8bd5[\u65b9\u6848](https://yanyiwu.com/work/2015/06/14/jieba-series-performance-test.html)\uff1a\u5148\u6309\u884c\u8bfb\u53d6\u6587\u672c\u56f4\u57ce\u5230\u4e00\u4e2a\u6570\u7ec4\u91cc\uff0c\u7136\u540e\u5faa\u73af\u5bf9\u56f4\u57ce\u6bcf\u884c\u6587\u5b57\u4f5c\u4e3a\u4e00\u4e2a\u53e5\u5b50\u8fdb\u884c\u5206\u8bcd\u3002\u56e0\u4e3a\u53ea\u5bf9\u56f4\u57ce\u8fd9\u672c\u4e66\u5206\u8bcd\u4e00\u904d\u592a\u5feb\u4e86\uff0c\u5bb9\u6613\u8bef\u5dee\u3002 \u6240\u4ee5\u5faa\u73af\u5bf9\u56f4\u57ce\u8fd9\u672c\u4e66\u5206\u8bcd50\u6b21\u3002\u57fa\u672c\u4e0a\u6bcf\u6b21\u5206\u8bcd\u8017\u65f6\u90fd\u5f88\u7a33\u5b9a\u3002 \u5206\u8bcd\u7b97\u6cd5\u90fd\u662f\u91c7\u7528\u3010\u7cbe\u786e\u6a21\u5f0f\u3011\u3002\n\n`lcut HMM=False` \n\n| \u65b9\u6848 | \u901f\u5ea6 |\n| ------------- |:-------------:|\n| cppjieba-py | 10.642102 |\n| jieba-fast==0.51 | 26.129298 |\n| jieba==0.39 | 50.623866 |\n\n`lcut HMM=True` \n\n| \u65b9\u6848 | \u901f\u5ea6 |\n| ------------- |:-------------:|\n| cppjieba-py | 13.139232 |\n| jieba-fast==0.51 | 34.574907 |\n| jieba==0.39 | 1:26.756226 |\n\n`posseg.lcut` \n\n| \u65b9\u6848 | \u901f\u5ea6 |\n| ------------- |:-------------:|\n| cppjieba-py | 20.382905 |\n| jieba==0.39 | 1:19.411649 |\n\n## Test \n\n`pip install \".[test]\"` \n`nosetests -c nose.cfg`", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bung87/cppjieba-py/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "cppjieba-py", "package_url": "https://pypi.org/project/cppjieba-py/", "platform": "", "project_url": "https://pypi.org/project/cppjieba-py/", "project_urls": { "Homepage": "https://github.com/bung87/cppjieba-py/" }, "release_url": "https://pypi.org/project/cppjieba-py/0.0.11/", "requires_dist": null, "requires_python": "", "summary": "python bindings of cppjieba", "version": "0.0.11" }, "last_serial": 4949137, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "4d440ed06a7f7f68d02115aad640d257", "sha256": "ff2fafb431df35c8d8ede6b1bf508a0207e1df74d4943e0490b80d8a49fdf52d" }, "downloads": -1, "filename": "cppjieba_py-0.0.10.tar.gz", "has_sig": false, "md5_digest": "4d440ed06a7f7f68d02115aad640d257", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4977877, "upload_time": "2018-08-18T08:57:21", "url": "https://files.pythonhosted.org/packages/ae/53/ed41d2fa14a6fa38850eec69a5f97d0097fe104ae4faa7ebca8b166fee4d/cppjieba_py-0.0.10.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "b95a08a043ff2783a13ee9f73580aff5", "sha256": "2e2e13fdff78b63e25ee63bcd3832542b98456db4f2b758f1174cfe4465a6086" }, "downloads": -1, "filename": "cppjieba_py-0.0.11.tar.gz", "has_sig": false, "md5_digest": "b95a08a043ff2783a13ee9f73580aff5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4976476, "upload_time": "2019-03-16T23:58:30", "url": "https://files.pythonhosted.org/packages/92/a6/05084c61137489700a049755ed0874bffc033190d8a2f5cd0eedd8ffb94f/cppjieba_py-0.0.11.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "35fa5071f771d16a3b190ec47bc72722", "sha256": "667be311082fa99c3c9a309d8cba9f4904f52c5a03e966a9fcb127d4c67d8da6" }, "downloads": -1, "filename": "cppjieba_py-0.0.9.tar.gz", "has_sig": false, "md5_digest": "35fa5071f771d16a3b190ec47bc72722", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4975479, "upload_time": "2018-06-10T11:31:31", "url": "https://files.pythonhosted.org/packages/30/31/ba5d8021334d61b8d376668023a969f713ef33bc659bf0b9478f77c598a6/cppjieba_py-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b95a08a043ff2783a13ee9f73580aff5", "sha256": "2e2e13fdff78b63e25ee63bcd3832542b98456db4f2b758f1174cfe4465a6086" }, "downloads": -1, "filename": "cppjieba_py-0.0.11.tar.gz", "has_sig": false, "md5_digest": "b95a08a043ff2783a13ee9f73580aff5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4976476, "upload_time": "2019-03-16T23:58:30", "url": "https://files.pythonhosted.org/packages/92/a6/05084c61137489700a049755ed0874bffc033190d8a2f5cd0eedd8ffb94f/cppjieba_py-0.0.11.tar.gz" } ] }