{"id":15284522,"url":"https://github.com/abhilash1910/bertsimilarity","last_synced_at":"2025-04-12T23:36:02.589Z","repository":{"id":42674864,"uuid":"315718076","full_name":"abhilash1910/BERTSimilarity","owner":"abhilash1910","description":"Sentential Semantic Similarity measurement library using BERT Embeddings for spatial distance evaluation.","archived":false,"fork":false,"pushed_at":"2020-12-14T19:00:05.000Z","size":29,"stargazers_count":27,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T23:35:25.834Z","etag":null,"topics":["bert","bert-model","bert-tokenizer","cosine-distance","pytorch","scipy","transformers-library"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhilash1910.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-24T18:22:17.000Z","updated_at":"2024-09-20T09:12:05.000Z","dependencies_parsed_at":"2022-07-08T05:31:23.743Z","dependency_job_id":null,"html_url":"https://github.com/abhilash1910/BERTSimilarity","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhilash1910%2FBERTSimilarity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhilash1910%2FBERTSimilarity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhilash1910%2FBERTSimilarity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhilash1910%2FBERTSimilarity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhilash1910","download_url":"https://codeload.github.com/abhilash1910/BERTSimilarity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647257,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bert","bert-model","bert-tokenizer","cosine-distance","pytorch","scipy","transformers-library"],"created_at":"2024-09-30T14:58:03.251Z","updated_at":"2025-04-12T23:36:02.549Z","avatar_url":"https://github.com/abhilash1910.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BERTSimilarity\n\n## A BERT Embedding library for sentence semantic similarity measurement :robot:\n\nThis library is a sentence semantic measurement tool based on BERT Embeddings. It uses the forward pass of the BERT (bert-base-uncased) model for estimating the embedding vectors and then applies the generic cosine formulation for distance measurement. The distance metric can be changed and the intermediate sentence and word embedding vectors can be attained as well. The model has been abstracted from the Google Research's [BERT implementation](https://github.com/google-research/bert/).The pytorch wrapper over BERT is credited to Chris McCormick.\n\n\n## Dependencies\n\n\u003ca href=\"https://pytorch.org/\"\u003ePytorch\u003c/a\u003e\n\n\n\u003ca href=\"https://huggingface.co/transformers/\"\u003eTransformers\u003c/a\u003e\n\n\n\u003ca href=\"https://www.scipy.org/\"\u003eScipy\u003c/a\u003e\n\n\n## Usability\n\nInstallation is carried out using the pip command as follows:\n\n```python\npip install BERTSimilarity==0.1\n```\n\nFor using inside the Jupyter Notebook or Python IDE:\n\n```python\nimport BERTSimilarity.BERTSimilarity as bertsimilarity\n```\n\nThe  'Similarity_Test.py' file contains an example of using the Library in this context.\n\n## Samples\n\nA sample of semantic similarity measurement with 4 different sentences , 2 of which are vaguely similar is provided below:\n\n\u003cimg src='https://github.com/abhilash1910/BERTSimilarity/blob/master/Sample_Similarity.PNG'\u003e\n\nThis [Colab Notebook](https://colab.research.google.com/drive/1OfFYGRdW3I8cMxL6Nj4KZd78PoiR4Lg0?usp=sharing) can be used as well for experimentation. \n\nA Kaggle Kernel for [Question Pair Similarity](https://www.kaggle.com/abhilash1910/bertsimilarity-library) detection is also provided which uses this library.\n\nThe Notebook is featured in [QuantumStat.com](https://notebooks.quantumstat.com/)\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhilash1910%2Fbertsimilarity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhilash1910%2Fbertsimilarity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhilash1910%2Fbertsimilarity/lists"}