{ "info": { "author": "Cosmos Zhou", "author_email": "744984949@qq.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# sentence splitting and intent classification\n\n# intent classification\n\nto split a paragraph into sentences, to classify the intent of a sentence, implement the following: \n\n\narr = classification.intent_splitting.split('\u6765\u70b9\u8212\u7f13\u4e00\u70b9\u7684\u97f3\u4e50\u7136\u540e\u5f00\u59cb\u5bfc\u822a') \n\nprint(arr)\n\nresult: [('\u6765\u70b9\u8212\u7f13\u4e00\u70b9\u7684\u97f3\u4e50', 'genre'), ('\u7136\u540e\u5f00\u59cb\u5bfc\u822a', 'navi')]\n\n\n#the usage of bert_semantic:\n#retrieve qa pairs from solr:\n question, answer = most_similar(s)\n if question:\n user_question = [s] * len(question)\n similarity = bert_semantic.instance.predict(user_question, question)\n\n for sent, score in zip(question, similarity):\n print('%s / %s = %f\\t%f' % (s, sent, score))\n\n index = similarity.argmax()\n print('highest score for bert semantic')\n print('%s / %s = %f' % (s, question[index], similarity[index]))\n print('answer = ', answer[index])\n question = question[index]\n answer = answer[index]\n similarity = similarity[index]\n\n if similarity >= thredshold:\n \treturn answer \n\n return None\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/me/myproject", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cosmosnlp", "package_url": "https://pypi.org/project/cosmosnlp/", "platform": "", "project_url": "https://pypi.org/project/cosmosnlp/", "project_urls": { "Homepage": "https://github.com/me/myproject" }, "release_url": "https://pypi.org/project/cosmosnlp/5.2.0/", "requires_dist": null, "requires_python": ">=3.6.0", "summary": "My short description for my project.", "version": "5.2.0" }, "last_serial": 4985648, "releases": { "5.2.0": [ { "comment_text": "", "digests": { "md5": "21d23d755f7548630a71cba532aee5c5", "sha256": "2fc25262fc0f1fef5fe6beac5673da33b7b06766f02382b054d74b84d02e4dcd" }, "downloads": -1, "filename": "cosmosnlp-5.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "21d23d755f7548630a71cba532aee5c5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 2502, "upload_time": "2019-03-26T02:41:43", "url": "https://files.pythonhosted.org/packages/23/ca/f37cf2b28f018b994180f1c8efefdf7fd535dac599c6149faf784008b3e9/cosmosnlp-5.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1dd75562f7c3c8473be737496b0861ef", "sha256": "dd5395c9d69abceceb65efab301246ea952ac866e422ced4e17c8f361da58f06" }, "downloads": -1, "filename": "cosmosnlp-5.2.0.tar.gz", "has_sig": false, "md5_digest": "1dd75562f7c3c8473be737496b0861ef", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 3647, "upload_time": "2019-03-26T02:41:45", "url": "https://files.pythonhosted.org/packages/4b/95/f08850774009ad00e947696e2f3db393ec31ec41db3a3c35eb32bc540dad/cosmosnlp-5.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "21d23d755f7548630a71cba532aee5c5", "sha256": "2fc25262fc0f1fef5fe6beac5673da33b7b06766f02382b054d74b84d02e4dcd" }, "downloads": -1, "filename": "cosmosnlp-5.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "21d23d755f7548630a71cba532aee5c5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6.0", "size": 2502, "upload_time": "2019-03-26T02:41:43", "url": "https://files.pythonhosted.org/packages/23/ca/f37cf2b28f018b994180f1c8efefdf7fd535dac599c6149faf784008b3e9/cosmosnlp-5.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1dd75562f7c3c8473be737496b0861ef", "sha256": "dd5395c9d69abceceb65efab301246ea952ac866e422ced4e17c8f361da58f06" }, "downloads": -1, "filename": "cosmosnlp-5.2.0.tar.gz", "has_sig": false, "md5_digest": "1dd75562f7c3c8473be737496b0861ef", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 3647, "upload_time": "2019-03-26T02:41:45", "url": "https://files.pythonhosted.org/packages/4b/95/f08850774009ad00e947696e2f3db393ec31ec41db3a3c35eb32bc540dad/cosmosnlp-5.2.0.tar.gz" } ] }