{ "info": { "author": "cph", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 3.6" ], "description": "# yoctol-nlu-py\n[![Build Status](https://travis-ci.org/Yoctol/yoctol-nlu-py.svg?branch=master)](https://travis-ci.org/Yoctol/yoctol-nlu-py)\n[![PyPI version](https://badge.fury.io/py/yoctol-nlu.svg)](https://badge.fury.io/py/yoctol-nlu)\n\nYoctol Natural Language Understanding SDK for python.\n\n## Install\nUse Python3\n```\npip install yoctol-nlu\n```\n\n## Usage\n\n### Intent Classifier Service\n\n#### Fetch Model & One Line Prediction\n```python\nfrom ynlu import NLUClient\n\nclient = NLUClient(token='YOUR_TOKEN_HERE')\n\n# Get all possible clf ids\nids = client.get_all_available_clf_ids()\nprint(ids)\n\n# Get model by id\nmodel = client.get_model_by_id(ids[0])\n\n# Predict\nintent_prediction, entity_prediction = model.predict('\u98f2\u6599\u559d\u5230\u98fd')\n\n# Also could get the clf by clf's name\n# Get all possible clf names\nnames = client.get_all_available_clf_names()\nprint(names)\n\n# Get model by name\nmodel = client.get_model_by_name(names[0])\n\n# Predict\nintent_prediction, entity_prediction = model.predict('\u98f2\u6599\u559d\u5230\u98fd')\n```\n\n#### Evaluations for Intent\n```python\nfrom ynlu import NLUClient\nfrom ynlu.sdk.evaluation import {\n # Accuracy\n intent_accuracy_score_with_threshold,\n # Precision\n intent_precision_score_with_threshold,\n # Recall\n intent_recall_score_with_threshold,\n}\n\nclient = NLUClient(token='YOUR_TOKEN_HERE')\nmodel = client.get_model_by_id('TARGET_MODEL_ID_HERE')\n\ntest_data = [\n 'This is a line ',\n 'for testing the NLUClient ',\n 'and evaluating the prediction ',\n 'from the trained model. ',\n]\n\nintent_predictions, entities_predictions = model.batch_predict(test_data)\n\n# Pure Accuracy\nprint(intent_accuracy_score_with_threshold(\n intent_predictions=intent_predictions,\n y_trues=test_data,\n threshold=0.,\n )\n)\n# Accuracy with threshold 0.5\nprint(intent_accuracy_score_with_threshold(\n intent_predictions=intent_predictions,\n y_trues=test_data,\n threshold=0.5,\n )\n)\n```\n\nCheck out the tutorials for more examples.\n\n## Documentation\n\nWe rely on Sphinx for user and API documentation.\n\nYou can run just make to do rebuild the API stubs and then build the HTML documentation.\n\n```\ncd docs\nmake # equivalent to `make apidoc && make html`\n```\n\nTo only build the html pages:\n\n```\ncd docs\nmake html\n```\n\nTo just re-generate the API reference.\n\n```\ncd docs\nmake apidoc # calls sphinx-apidoc\n```\nRun `make help` for a full list of build options.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "yoctol-nlu", "package_url": "https://pypi.org/project/yoctol-nlu/", "platform": "", "project_url": "https://pypi.org/project/yoctol-nlu/", "project_urls": null, "release_url": "https://pypi.org/project/yoctol-nlu/0.7.1/", "requires_dist": [ "gql-fork (>=0.2.0)", "requests (>=2.13.0)", "scipy (>=1.0.1)", "numpy (>=1.14.2)", "matplotlib (==2.2.2)", "pandas", "pandas (<0.21)", "seaborn (>=0.8.1)", "scikit-learn (>=0.19.1)" ], "requires_python": "", "summary": "Yoctol Natural Language Understanding SDK", "version": "0.7.1" }, "last_serial": 3768387, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "75f8b1eb84c8e954ed8dc69e8ad94cf6", "sha256": "e853b57054a430254817469316fb30117b60e2bbcdcec1a061f726c654a94820" }, "downloads": -1, "filename": "yoctol-nlu-0.1.0.tar.gz", "has_sig": false, "md5_digest": "75f8b1eb84c8e954ed8dc69e8ad94cf6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1216, "upload_time": "2017-05-09T06:43:32", "url": "https://files.pythonhosted.org/packages/32/19/effefb5b2671749b4b792a6c5ee2758879d50eaffdba0f661fff19f5a673/yoctol-nlu-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "35274fd38e0ba388abc73297f46beb4a", "sha256": "0d4c1e83e11c0497986d5071b4d722d39722543ca0d4eafea43af91289fd4560" }, "downloads": -1, "filename": "yoctol_nlu-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "35274fd38e0ba388abc73297f46beb4a", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6347, "upload_time": "2017-05-12T08:36:05", "url": "https://files.pythonhosted.org/packages/a8/e8/5dcf15020ee71ea47cca1e26f73a1ea544bb905526ed92ef881cc23174a2/yoctol_nlu-0.2.0-py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e664ee88aee3a62822de786682ea9e16", "sha256": "68c1515d5c6db43e3a5f1a5bdbb8a05213c582572f9a828c3a708441e36ed5b2" }, "downloads": -1, "filename": "yoctol_nlu-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e664ee88aee3a62822de786682ea9e16", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6363, "upload_time": "2017-05-12T08:42:43", "url": "https://files.pythonhosted.org/packages/9f/4b/332d730611abc32edff8b89396e2f7ab4bb06cf26d7b6ee3349e315b60d6/yoctol_nlu-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7daafa043046ef807be01dbc3b4d0e5f", "sha256": "0c48cb06da877ee686b3b1be98eded7f21cf4ebdc4f62463c686a25c652ef56a" }, "downloads": -1, "filename": "yoctol-nlu-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7daafa043046ef807be01dbc3b4d0e5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3448, "upload_time": "2017-05-12T08:44:23", "url": "https://files.pythonhosted.org/packages/e1/4c/e012f1655aad9bca0c7c58afd991558590955cf1f3b318b8157f230fd000/yoctol-nlu-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "eeee7566490332df89cb73d059bf8603", "sha256": "39de824bb69fb2c92fee80a2c5745591c1cdcecced780ac92b8e5ed8a35baeee" }, "downloads": -1, "filename": "yoctol_nlu-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "eeee7566490332df89cb73d059bf8603", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6794, "upload_time": "2017-05-31T05:57:06", "url": "https://files.pythonhosted.org/packages/50/77/d3d93bf82a069646961101761b25be1f7d60cd8a3a7effabe5a083f79bac/yoctol_nlu-0.2.2-py3-none-any.whl" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "4747eb21290e773dcc3d711b5be5691c", "sha256": "df3d84c3c8bd3db4aead3605f84d66fded3481c54ea7303241ea43fed142424b" }, "downloads": -1, "filename": "yoctol_nlu-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "4747eb21290e773dcc3d711b5be5691c", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7081, "upload_time": "2017-06-28T03:26:03", "url": "https://files.pythonhosted.org/packages/5d/69/af8e5af24a82729a6bad511ac07d473f55714e4dff2ac60e56a413594f45/yoctol_nlu-0.2.3-py3-none-any.whl" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "454cbf0a6c4fb45ce38fbfdd839b5cff", "sha256": "55463da973d131774e21bcc919a2a14d59c78b88f02adae1d8ac7b3c5a6e8bef" }, "downloads": -1, "filename": "yoctol_nlu-0.2.4-py3-none-any.whl", "has_sig": false, "md5_digest": "454cbf0a6c4fb45ce38fbfdd839b5cff", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7080, "upload_time": "2017-07-03T07:15:43", "url": "https://files.pythonhosted.org/packages/06/df/770374f850a62938c67ca8564de92a46b9f28f2d58f1e29bc446961409bd/yoctol_nlu-0.2.4-py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "dc26bc39ff944737799d1944cc935a93", "sha256": "74a0e99beb001b7628d8a43a2635737df38b340ddc505e38b4f4d5dd53b98ed1" }, "downloads": -1, "filename": "yoctol_nlu-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "dc26bc39ff944737799d1944cc935a93", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7273, "upload_time": "2017-07-17T12:19:08", "url": "https://files.pythonhosted.org/packages/8c/ef/819c57ebfd19b8d5ebc36780166fb3a7e10178ea55a7e950b68984fafe44/yoctol_nlu-0.3.0-py3-none-any.whl" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "deabc860fc743d5d20d973e0abb768b3", "sha256": "6e2042b554e7019bfbcd22f5d61fe378869effaaebb11aec9cca08caf7ba40b9" }, "downloads": -1, "filename": "yoctol_nlu-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "deabc860fc743d5d20d973e0abb768b3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9775, "upload_time": "2018-03-16T02:51:03", "url": "https://files.pythonhosted.org/packages/6c/9d/1ee5698f53ab73a456c94e3b00470ed0487cbf2569c10718fcab68af812d/yoctol_nlu-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0036009beaa9991305209bae0260b276", "sha256": "3d9f76abc696c54e4706aa3e43215b1cd924cb3134b35a31847932607c97afac" }, "downloads": -1, "filename": "yoctol-nlu-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0036009beaa9991305209bae0260b276", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3548, "upload_time": "2018-03-16T02:51:26", "url": "https://files.pythonhosted.org/packages/e0/5e/ee3fc95d8730fe1f03d5ba49b6a8adcac6be876a1b91767332e1cd5b0b28/yoctol-nlu-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "b78011e362d56dd0ff22ee79c7271c22", "sha256": "6f45df5c086271f93a6426817f20de0235af4a723ec2afefdf4c75f4d09d04c4" }, "downloads": -1, "filename": "yoctol_nlu-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b78011e362d56dd0ff22ee79c7271c22", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19755, "upload_time": "2018-03-28T06:49:19", "url": "https://files.pythonhosted.org/packages/88/b8/726ee5f650e6ebb3ff485f98e2bce391b94cd74179f81d5fd869403e308d/yoctol_nlu-0.5.0-py3-none-any.whl" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "0a7c5623226f95527dbe106f6554dc23", "sha256": "d8ffb815cb813f482cf3e727b5ee4f69bbf0d708b517b16ec4615cc80d1082c6" }, "downloads": -1, "filename": "yoctol_nlu-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0a7c5623226f95527dbe106f6554dc23", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 29057, "upload_time": "2018-04-02T06:48:12", "url": "https://files.pythonhosted.org/packages/60/84/1a6c07ba30a52744b0ee9c028b78a4f8b34c9064827955b672534e979716/yoctol_nlu-0.6.0-py3-none-any.whl" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "dc3b14a0e5ea1957f3a71398ed31490f", "sha256": "c5de6493a3c3c0c03c3a058c874324882b4c402d3322fbb7d2f514fc6d430665" }, "downloads": -1, "filename": "yoctol_nlu-0.7.0-py3-none-any.whl", "has_sig": false, "md5_digest": "dc3b14a0e5ea1957f3a71398ed31490f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 37952, "upload_time": "2018-04-11T07:25:03", "url": "https://files.pythonhosted.org/packages/27/e3/46ec62312acc464297b1790f117a4766c56fc97063f38ad01f279fe70128/yoctol_nlu-0.7.0-py3-none-any.whl" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "e0577b9841f2a34e834b9237bb9207eb", "sha256": "bc3fd4e0b8d7afbfa715e2a126a507b5a79827eb0325f40556e6775165f05649" }, "downloads": -1, "filename": "yoctol_nlu-0.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e0577b9841f2a34e834b9237bb9207eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38774, "upload_time": "2018-04-16T07:55:20", "url": "https://files.pythonhosted.org/packages/15/b5/fbbdd2255569165cae5334cee9919e1aec6fb17a4529e99b9c95fb10bd88/yoctol_nlu-0.7.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e0577b9841f2a34e834b9237bb9207eb", "sha256": "bc3fd4e0b8d7afbfa715e2a126a507b5a79827eb0325f40556e6775165f05649" }, "downloads": -1, "filename": "yoctol_nlu-0.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e0577b9841f2a34e834b9237bb9207eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38774, "upload_time": "2018-04-16T07:55:20", "url": "https://files.pythonhosted.org/packages/15/b5/fbbdd2255569165cae5334cee9919e1aec6fb17a4529e99b9c95fb10bd88/yoctol_nlu-0.7.1-py3-none-any.whl" } ] }