{ "info": { "author": "Andriy Mulyar, Elliot Schumacher and Mark Dredze", "author_email": "contact@andriymulyar.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.5", "Topic :: Text Processing :: Linguistic" ], "description": "# semantic-text-similarity\nan easy-to-use interface to fine-tuned BERT models for computing semantic similarity. that's it.\n\nThis project contains an interface to fine-tuned, BERT-based semantic text similarity models. It modifies [pytorch-transformers](https://github.com/huggingface/pytorch-transformers) by abstracting away all the research benchmarking code for ease of real-world applicability.\n\n| Model | Dataset | Dev. Correlation |\n|-------------------|------------------|------------------|\n| Web STS BERT | STS-B | 0.893 |\n| Clinical STS BERT | MED-STS | 0.854 |\n\n# Installation\n\nInstall with pip:\n\n```\npip install semantic-text-similarity\n```\n\nor directly:\n\n```\npip install git+https://github.com/AndriyMulyar/semantic-text-similarity\n```\n\n# Use\nMaps batches of sentence pairs to real-valued scores in the range [0,5]\n```python\nfrom semantic_text_similarity.models import WebBertSimilarity\nfrom semantic_text_similarity.models import ClinicalBertSimilarity\n\nweb_model = WebBertSimilarity(device='cpu', batch_size=10) #defaults to GPU prediction\n\nclinical_model = ClinicalBertSimilarity(device='cuda', batch_size=10) #defaults to GPU prediction\n\nweb_model.predict([(\"She won an olympic gold medal\",\"The women is an olympic champion\")])\n```\nMore [examples](/examples).\n\n\n\n# Notes\n- You will need a GPU to apply these models if you would like any hint of speed in your predictions.\n- Model downloads are cached in `~/.cache/torch/semantic_text_similarity/`. Try clearing this folder if you have issues.\n\n\n# Acknowledgement\nClinical models in this project were submitted to the 2019 N2C2 Shared Task Track 1.\nImplementation and model training in this project was supported by funding from the Mark Dredze Lab at Johns Hopkins University.\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/AndriyMulyar/semantic-text-similarity", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "semantic-text-similarity", "package_url": "https://pypi.org/project/semantic-text-similarity/", "platform": "", "project_url": "https://pypi.org/project/semantic-text-similarity/", "project_urls": { "Homepage": "https://github.com/AndriyMulyar/semantic-text-similarity" }, "release_url": "https://pypi.org/project/semantic-text-similarity/1.0.3/", "requires_dist": [ "torch", "strsim", "fuzzywuzzy[speedup]", "pytorch-transformers (==1.1.0)", "scipy" ], "requires_python": "", "summary": "implementations of models and metrics for semantic text similarity. that's it.", "version": "1.0.3" }, "last_serial": 5946696, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8023e981f9c0b73ba25f45d6328ec8d7", "sha256": "34a145fefa933086579e0902978585de8a37e932d5420f70b47336ff3d604422" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8023e981f9c0b73ba25f45d6328ec8d7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 414597, "upload_time": "2019-07-22T21:41:18", "url": "https://files.pythonhosted.org/packages/2b/81/57f8e80e52eaeeb52cdda4224e1083a122a50442e78fec1c8c58d4da25d9/semantic_text_similarity-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "51eceb344cf426d0fbacc9414e36dbca", "sha256": "b577fe17092b3e04becc26c9d80c66fe8f83376bae04c6c3f9619c88b807902c" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.0.tar.gz", "has_sig": false, "md5_digest": "51eceb344cf426d0fbacc9414e36dbca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 409425, "upload_time": "2019-07-22T21:41:21", "url": "https://files.pythonhosted.org/packages/a0/20/8d48f07e801e22467c7aa16f8bb5bb108c2ffb7b16a9ff6955beb9c1ed56/semantic_text_similarity-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "53983afab6da547d8ca2f01233899c6c", "sha256": "6ba80570345461ca03639b197a1fe85cd7e0f213c1a803787fb04b887d62ece6" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "53983afab6da547d8ca2f01233899c6c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 414665, "upload_time": "2019-07-23T15:59:14", "url": "https://files.pythonhosted.org/packages/2a/0a/a1fe5e96fd6acf24dcd96f64376c2bed341ee64974683431519aa19b9dc8/semantic_text_similarity-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "344ef61fb2fcf31da0e0e7d2b24ad000", "sha256": "8b85c89733b129f8f8e215a23f90b060f0fed32f23556d7ee757508f5942e4b6" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.1.tar.gz", "has_sig": false, "md5_digest": "344ef61fb2fcf31da0e0e7d2b24ad000", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 409535, "upload_time": "2019-07-23T15:59:16", "url": "https://files.pythonhosted.org/packages/bb/d6/0cd6c5081107bcbe6d246c798d1e8c8f5bbcd4fc094cb28b0cffef7e613c/semantic_text_similarity-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "19b45be123568e69c2873a02c0eed843", "sha256": "e4396a1241f4d57531d606af20e92f6e728ce7c578ae150214cfe6c468e996ec" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "19b45be123568e69c2873a02c0eed843", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 415864, "upload_time": "2019-08-14T14:33:02", "url": "https://files.pythonhosted.org/packages/cd/64/92396a88ffbe2f963479219a4f4157280acaf1524b4f81e2002f4b5b663c/semantic_text_similarity-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca7b80e7b64ad3e848b8c225eb712ebc", "sha256": "ffbc7e07f47b03e496213ffb8e1fb9e90790ad2e3237b5b6ba3b92de205c4bbb" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ca7b80e7b64ad3e848b8c225eb712ebc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 410194, "upload_time": "2019-08-14T14:33:05", "url": "https://files.pythonhosted.org/packages/81/bf/896a8f6c3acf0820107aaa8aab14d34d8ce4c8602a73083ea1ba6a70f0d7/semantic_text_similarity-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "dda13128f964d646b350606555a4b013", "sha256": "78d4a7e3544aa1c744320286dedec8fb7bf81cca0bbea473972bac943e359e78" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "dda13128f964d646b350606555a4b013", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 416023, "upload_time": "2019-10-08T21:11:03", "url": "https://files.pythonhosted.org/packages/f1/d7/eade8afd89103e3dcc4b4db146a134a26bd7336ba86d9a95cf0d0e3a28cb/semantic_text_similarity-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "30f8996a58ea8924ce448ad01109e823", "sha256": "35cee23188703ce1da4dcb5ad39cccb0c0f60dbd544a58396b6431ae0f137684" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.3.tar.gz", "has_sig": false, "md5_digest": "30f8996a58ea8924ce448ad01109e823", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 410513, "upload_time": "2019-10-08T21:11:05", "url": "https://files.pythonhosted.org/packages/a4/77/a7c1f4cc37431dd4f5d6796e11a2fed55373743650babacaf480c62c1c31/semantic_text_similarity-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dda13128f964d646b350606555a4b013", "sha256": "78d4a7e3544aa1c744320286dedec8fb7bf81cca0bbea473972bac943e359e78" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "dda13128f964d646b350606555a4b013", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 416023, "upload_time": "2019-10-08T21:11:03", "url": "https://files.pythonhosted.org/packages/f1/d7/eade8afd89103e3dcc4b4db146a134a26bd7336ba86d9a95cf0d0e3a28cb/semantic_text_similarity-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "30f8996a58ea8924ce448ad01109e823", "sha256": "35cee23188703ce1da4dcb5ad39cccb0c0f60dbd544a58396b6431ae0f137684" }, "downloads": -1, "filename": "semantic_text_similarity-1.0.3.tar.gz", "has_sig": false, "md5_digest": "30f8996a58ea8924ce448ad01109e823", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 410513, "upload_time": "2019-10-08T21:11:05", "url": "https://files.pythonhosted.org/packages/a4/77/a7c1f4cc37431dd4f5d6796e11a2fed55373743650babacaf480c62c1c31/semantic_text_similarity-1.0.3.tar.gz" } ] }