{"id":24271697,"url":"https://github.com/soenneker/soenneker.utils.string.cosinesimilarity","last_synced_at":"2026-04-23T03:04:47.413Z","repository":{"id":214891131,"uuid":"737608674","full_name":"soenneker/soenneker.utils.string.cosinesimilarity","owner":"soenneker","description":"A utility library for comparing strings via Cosine Similarity","archived":false,"fork":false,"pushed_at":"2026-04-21T09:58:28.000Z","size":1531,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-21T11:41:00.774Z","etag":null,"topics":["comparison","cosine","cosinesimilarity","cosinesimilaritystringutil","csharp","dotnet","fuzzy","matching","similarity","string","tf-idf","utils","vector"],"latest_commit_sha":null,"homepage":"https://soenneker.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soenneker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"soenneker","thanks_dev":"soenneker"}},"created_at":"2023-12-31T18:17:11.000Z","updated_at":"2026-04-21T09:58:32.000Z","dependencies_parsed_at":"2026-02-19T04:05:16.661Z","dependency_job_id":null,"html_url":"https://github.com/soenneker/soenneker.utils.string.cosinesimilarity","commit_stats":null,"previous_names":["soenneker/soenneker.utils.string.cosinesimilarity"],"tags_count":105,"template":false,"template_full_name":null,"purl":"pkg:github/soenneker/soenneker.utils.string.cosinesimilarity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.utils.string.cosinesimilarity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.utils.string.cosinesimilarity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.utils.string.cosinesimilarity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.utils.string.cosinesimilarity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soenneker","download_url":"https://codeload.github.com/soenneker/soenneker.utils.string.cosinesimilarity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.utils.string.cosinesimilarity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32163853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T02:19:40.750Z","status":"ssl_error","status_checked_at":"2026-04-23T02:17:55.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["comparison","cosine","cosinesimilarity","cosinesimilaritystringutil","csharp","dotnet","fuzzy","matching","similarity","string","tf-idf","utils","vector"],"created_at":"2025-01-15T17:59:19.243Z","updated_at":"2026-04-23T03:04:47.408Z","avatar_url":"https://github.com/soenneker.png","language":"C#","funding_links":["https://github.com/sponsors/soenneker","https://thanks.dev/soenneker"],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/nuget/v/soenneker.utils.string.cosinesimilarity.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.utils.string.cosinesimilarity/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.utils.string.cosinesimilarity/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.utils.string.cosinesimilarity/actions/workflows/publish-package.yml)\n[![](https://img.shields.io/nuget/dt/soenneker.utils.string.cosinesimilarity.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.utils.string.cosinesimilarity/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.utils.string.cosinesimilarity/codeql.yml?label=CodeQL\u0026style=for-the-badge)](https://github.com/soenneker/soenneker.utils.string.cosinesimilarity/actions/workflows/codeql.yml)\n\n# ![](https://user-images.githubusercontent.com/4441470/224455560-91ed3ee7-f510-4041-a8d2-3fc093025112.png) Soenneker.Utils.String.CosineSimilarity\n### A utility library for comparing strings via Cosine Similarity\n\n## Installation\n\n```\ndotnet add package Soenneker.Utils.String.CosineSimularity\n```\n\n## Why?\n\nImagine you have two sentences or documents. Cosine similarity helps you figure out how similar they are by looking at the **-words-** they share. Here's why it's handy:\n\n### Easy to Understand:\nCosine similarity is easy to understand. It's a number between 0 and 1 that represents how similar two documents are. The closer to 1, the more similar they are.\n\n### Not Bothered by Length: \nWhether a text is long or short doesn't throw off cosine similarity. It cares more about the words and their relationships than the total number of words.\n\n### Meaning, Not Just Frequency:\nIt focuses on the meaning of words, not just how often they show up. So, even if one document has a lot more words than another, they might still be considered similar if they share important terms.\n\n### Efficient for Big Tasks:\nWhen you're dealing with lots of documents or a ton of text, cosine similarity is efficient. It doesn't get bogged down by complicated calculations, making it a practical choice for large datasets.\n\n## Usage\n\n```csharp\nvar text1 = \"This is a test\";\nvar text2 = \"This is another test\";\n\ndouble result = CosineSimilarityStringUtil.CalculateSimilarityPercentage(text1, text2); // 75\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.utils.string.cosinesimilarity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoenneker%2Fsoenneker.utils.string.cosinesimilarity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.utils.string.cosinesimilarity/lists"}