{ "info": { "author": "wenjiewu", "author_email": "wuwenjie718@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "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" ], "description": "===============================\nyige-python\n===============================\n\n\n.. image:: https://img.shields.io/pypi/v/yige.svg\n :target: https://pypi.python.org/pypi/yige\n\n.. image:: https://img.shields.io/travis/wwj718/yige.svg\n :target: https://travis-ci.org/wwj718/yige\n\n.. image:: https://readthedocs.org/projects/yige/badge/?version=latest\n :target: https://yige-python.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/wwj718/yige/shield.svg\n :target: https://pyup.io/repos/github/wwj718/yige/\n :alt: Updates\n\n\nPython library for yige. [\u4e2d\u6587](https://github.com/wwj718/yige-python/blob/master/readme.md)\n\n\n\n\n* Free software: MIT license\n* Documentation: https://yige-python.readthedocs.io.\n\nOverview\n--------\n\nThe yige Python SDK makes it easy to use yige.ai\n\nFeatures\n--------\n\n* debug console\n* text query\n* entity manage\n\n\nInstallation\n---------\n\nTo install yige, simply:\n\n.. code-block:: bash\n\n $ pip install yige\n\nor install it from repo:\n\n.. code-block:: bash\n\n $ pip install https://github.com/wwj718/yige-python.git\n\nUsage\n---------\n1. debug console\n\n.. code-block:: bash\n\n >>> yige --console\n ...\n\n\n.. image:: img/yige1.png\n\n\n.. image:: img/yige2.png\n\n2. send text query\n\n.. code-block:: python\n\n >>> CLIENT_ACCESS_TOKEN = ''\n >>> ai = yige.Yige(CLIENT_ACCESS_TOKEN)\n >>> request = ai.text_request()\n >>> request.query = \"\u6211\u60f3\u4e70\u978b\" \n >>> response = request.getresponse() #\u6ce8\u610f\u7f6e\u4fe1\u5ea6 confidence\n >>> print(response.json())\n ...\n\n3. post user entities\n\n.. code-block:: python\n\n >>> DEV_ACCESS_TOKEN = ''\n >>> ai = yige.Yige(DEV_ACCESS_TOKEN)\n >>> payload= {}\n >>> payload[\"name\"] = \"\u811a\u578b\" # \u8bcd\u5e93\u540d\u79f0\n >>> payload[\"type\"] = 1 #\u662f\u5426\u5b9a\u4e49\u540c\u4e49\u8bcd 1\u662f 0\u5426\n >>> payload[\"automated_expansion\"] = 0\n >>> payload[\"entries\"] = [] # \u8bcd\u5e93\u5185\u5bb9\n >>> entity1 = {\n \"value\": \"\u6b63\u5e38\u5185\u65cb\", # \u540c\u4e49\u8bcd\u4e2d\u6bd4\u8f83\u6743\u5a01\u7684\u540d\u79f0\n \"synonyms\": [ # \u540c\u4e49\u8bcd\n \"\u6b63\u5e38\u5185\u65cb\",\n \"\u5185\u65cb\u6b63\u5e38\",\n \"\u6b63\u5e38\u8db3\u5f13\",\n \"\u8db3\u5f13\u6b63\u5e38\"\n ]\n }\n >>> payload[\"entries\"].append(entity1)\n >>> user_entities_request = ai.user_entities_request()\n >>> user_entities_request.user_entities = payload\n >>> user_entities_response = user_entities_request.getresponse() \n >>> print(user_entities_response.json())\n ...\n\n\nRunning examples\n--------\n\n1. Find examples from 'examples' path.\n2. Insert API key.\n\n.. code-block:: python\n\n >>> CLIENT_ACCESS_TOKEN = ''\n ...\n\n\n\nTest\n--------\n\nmake test\n\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n\n=======\nHistory\n=======\n\n0.1.0 (2017-01-16)\n------------------\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wwj718/yige", "keywords": "yige", "license": "MIT license", "maintainer": null, "maintainer_email": null, "name": "yige", "package_url": "https://pypi.org/project/yige/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yige/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/wwj718/yige" }, "release_url": "https://pypi.org/project/yige/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Python library for yige.ai", "version": "0.2.1" }, "last_serial": 2679591, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e6721d02bba16d1556337a54114d0ef6", "sha256": "3c1869b6155f7c0a0ef17521b4e617fb3ee035a42236ef7a83301f3b011d3e71" }, "downloads": -1, "filename": "yige-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e6721d02bba16d1556337a54114d0ef6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14055, "upload_time": "2017-01-16T12:35:41", "url": "https://files.pythonhosted.org/packages/23/6e/e01117fde87d9172e125bdd4120a1a305c177be484d99eaa49bcfef15c1b/yige-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "01c979a54b9e2266fb41a70fb0a6983a", "sha256": "3c611c80c03b692586c6eec423b18a477cc4cb8ee9649a699340ae6eb6969da0" }, "downloads": -1, "filename": "yige-0.1.1.tar.gz", "has_sig": false, "md5_digest": "01c979a54b9e2266fb41a70fb0a6983a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18610, "upload_time": "2017-01-22T13:27:00", "url": "https://files.pythonhosted.org/packages/38/a5/8dab57d10e2773e42939464535655911f58ebc00dbea8d8c07c453996e1a/yige-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "a7ebf5da55cdecf19bf2e9a5ec3114c1", "sha256": "fcce114c50741164b6e0c26e2aa135df5e38a9592279000c9f92bb60a3f2ba9a" }, "downloads": -1, "filename": "yige-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a7ebf5da55cdecf19bf2e9a5ec3114c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21224, "upload_time": "2017-02-28T14:06:37", "url": "https://files.pythonhosted.org/packages/c7/32/10628b251f4e9c6eda6b36bb026783bb9a6832f3076943dc66aa389a2820/yige-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "b81b8c3a5074e66281f776577ebb6399", "sha256": "de42a0de3f9fa7a741a1232c57c0a000959ae53c9bef12fe2c3b8a8218ba5e25" }, "downloads": -1, "filename": "yige-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b81b8c3a5074e66281f776577ebb6399", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21516, "upload_time": "2017-03-03T04:20:21", "url": "https://files.pythonhosted.org/packages/49/9c/3de7072e20330a05d9800acd2ac905ae6661bf8b427a1577f36f12346f65/yige-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b81b8c3a5074e66281f776577ebb6399", "sha256": "de42a0de3f9fa7a741a1232c57c0a000959ae53c9bef12fe2c3b8a8218ba5e25" }, "downloads": -1, "filename": "yige-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b81b8c3a5074e66281f776577ebb6399", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21516, "upload_time": "2017-03-03T04:20:21", "url": "https://files.pythonhosted.org/packages/49/9c/3de7072e20330a05d9800acd2ac905ae6661bf8b427a1577f36f12346f65/yige-0.2.1.tar.gz" } ] }