{ "info": { "author": "Junjie Wu", "author_email": "wujj38@mail2.sysu.edu.cn", "bugtrack_url": null, "classifiers": [], "description": "# Supportr\n\n## Intro\nsupportr is a package used to predict the value of support of texts.\n\nIt is based on a fine tuned BERT model.\n## Install \n\n### Use pip\nIf `pip` is installed, supportr could be installed directly from it:\n\n pip install supportr\n\n### Dependencies\n\tpython>=3.6.0\n\ttorch>=0.4.1\n\tnumpy\n\tpandas\n\tunidecode\n\tpytorch-pretrained-bert\n\tpytorch-transformers\n\n\n\n## Usage and Example\n\n### Notes: During your first usage, the package will download a model file automatically, which is about 400MB.\n\n### `predict`\n`predict` is the core method of this package, \nwhich takes a single text of a list of texts, and returns a list of raw values in `[1,5]` (higher means more support, while lower means less).\n\n### Simplest usage\n\nYou may directly import `supportr` and use the default predict method, e.g.:\n\n >>> import supportr\n >>> supportr.predict([\"I am totally agree with you\"])\n [3.8364935]\n\n### Construct from class\nAlternatively, you may also construct the object from class, where you could customize the model path and device:\n\n\t>>> from supportr import Supportr\n\t>>> sr = Supportr()\n\n\t# Predict a single text\n\t>>> sr.predict([\"I am totally agree with you\"])\n\t[3.8364935]\n\n\t# Predict a list of texts\n\t>>> preds = sr.predict(['I am totally agree with you','I hate you'])\n >>> f\"Raw values are {preds}\"\n [3.836493 1.7458204]\n\n\n\nMore detail on how to construct the object is available in docstrings.\n\n### Model using multiprocessing when preprocessing a large dataset into BERT input features \nIf you want to use several cpu cores via multiprocessing while preprocessing a large dataset, you may construct the object via\n\n >>> pr = Supportr(CPU_COUNT=cpu_cpunt, CHUNKSIZE=chunksize)\n\nIf you want to faster the code through multi gpus, you may construct the object via\n\n >>> pr = Supportr(is_paralleled=True, BATCH_SIZE = batch_size)\n\n\n## Contact\nJunjie Wu (wujj38@mail2.sysu.edu.cn)\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": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "supportr", "package_url": "https://pypi.org/project/supportr/", "platform": "", "project_url": "https://pypi.org/project/supportr/", "project_urls": null, "release_url": "https://pypi.org/project/supportr/1.2/", "requires_dist": null, "requires_python": ">=3.6", "summary": "supportr", "version": "1.2" }, "last_serial": 5682432, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "5fa90fc41615fcdf0c66ac15242ea1d2", "sha256": "8a12dfddc9c6a66861be6a6b40a9be8d8fbf9497cf1bbd33b84165e2362e68ff" }, "downloads": -1, "filename": "supportr-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5fa90fc41615fcdf0c66ac15242ea1d2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7897, "upload_time": "2019-08-14T21:57:52", "url": "https://files.pythonhosted.org/packages/c0/12/25191e17a576dfb708aa1ea58481e5c2ada37df9c421c2d44e2975416cc0/supportr-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f601b94130aeeff38eb49902b2ba8346", "sha256": "45b65a11f8b289da6519c71da381edd496f5be87f987118633eb9af1d8d5c8d2" }, "downloads": -1, "filename": "supportr-1.1.tar.gz", "has_sig": false, "md5_digest": "f601b94130aeeff38eb49902b2ba8346", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6399, "upload_time": "2019-08-14T21:57:54", "url": "https://files.pythonhosted.org/packages/e7/fc/6a53d438a8d317ad6460f1e24648a20755e78e135fe4cf80a13d334c38cf/supportr-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "8fa57894f41de93cae3e857861b84587", "sha256": "bc42d947050763b4ff436cec744567ca900a1edb616f0610d555a46d381f23e6" }, "downloads": -1, "filename": "supportr-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8fa57894f41de93cae3e857861b84587", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7890, "upload_time": "2019-08-15T14:15:55", "url": "https://files.pythonhosted.org/packages/2d/a2/9c6065d15fe79edde4a14a47f53716a806978dc8b59a69230678e3e05d1d/supportr-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "468b2f917b8a630ae6ef2a4cc3b796aa", "sha256": "4f8b01cc213de8ebb32886d854a1be1073f43e8779026902d272b7d58452be9b" }, "downloads": -1, "filename": "supportr-1.2.tar.gz", "has_sig": false, "md5_digest": "468b2f917b8a630ae6ef2a4cc3b796aa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6392, "upload_time": "2019-08-15T14:15:56", "url": "https://files.pythonhosted.org/packages/9b/98/36f0d00866c3b354a98bf4fd8ea670e21a866025e35fbd698f43cfc3c640/supportr-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8fa57894f41de93cae3e857861b84587", "sha256": "bc42d947050763b4ff436cec744567ca900a1edb616f0610d555a46d381f23e6" }, "downloads": -1, "filename": "supportr-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8fa57894f41de93cae3e857861b84587", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7890, "upload_time": "2019-08-15T14:15:55", "url": "https://files.pythonhosted.org/packages/2d/a2/9c6065d15fe79edde4a14a47f53716a806978dc8b59a69230678e3e05d1d/supportr-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "468b2f917b8a630ae6ef2a4cc3b796aa", "sha256": "4f8b01cc213de8ebb32886d854a1be1073f43e8779026902d272b7d58452be9b" }, "downloads": -1, "filename": "supportr-1.2.tar.gz", "has_sig": false, "md5_digest": "468b2f917b8a630ae6ef2a4cc3b796aa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6392, "upload_time": "2019-08-15T14:15:56", "url": "https://files.pythonhosted.org/packages/9b/98/36f0d00866c3b354a98bf4fd8ea670e21a866025e35fbd698f43cfc3c640/supportr-1.2.tar.gz" } ] }