Soenneker.Utils.String.CosineSimilarity 2.1.379

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.String.CosineSimilarity --version 2.1.379
NuGet\Install-Package Soenneker.Utils.String.CosineSimilarity -Version 2.1.379
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Utils.String.CosineSimilarity" Version="2.1.379" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Utils.String.CosineSimilarity --version 2.1.379
#r "nuget: Soenneker.Utils.String.CosineSimilarity, 2.1.379"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Soenneker.Utils.String.CosineSimilarity as a Cake Addin
#addin nuget:?package=Soenneker.Utils.String.CosineSimilarity&version=2.1.379

// Install Soenneker.Utils.String.CosineSimilarity as a Cake Tool
#tool nuget:?package=Soenneker.Utils.String.CosineSimilarity&version=2.1.379

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.String.CosineSimilarity

A utility library for comparing strings via Cosine Similarity

Installation

dotnet add package Soenneker.Utils.String.CosineSimularity

Why?

Imagine 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:

Easy to Understand:

Cosine 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.

Not Bothered by Length:

Whether 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.

Meaning, Not Just Frequency:

It 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.

Efficient for Big Tasks:

When 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.

Usage

var text1 = "This is a test";
var text2 = "This is another test";

double result = CosineSimilarityStringUtil.CalculateSimilarityPercentage(text1, text2); // 75
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.381 15 6/27/2024
2.1.380 28 6/27/2024
2.1.379 65 6/22/2024
2.1.378 63 6/22/2024
2.1.377 63 6/22/2024
2.1.376 76 6/16/2024
2.1.375 74 6/15/2024
2.1.374 74 6/15/2024
2.1.373 80 6/15/2024
2.1.372 82 6/15/2024
2.1.371 74 6/15/2024
2.1.370 75 6/15/2024
2.1.369 72 6/15/2024
2.1.368 77 6/15/2024
2.1.367 66 6/14/2024
2.1.366 71 6/14/2024
2.1.365 75 6/4/2024
2.1.364 85 6/4/2024
2.1.363 85 6/2/2024
2.1.362 87 6/1/2024
2.1.361 77 6/1/2024
2.1.360 76 6/1/2024
2.1.359 77 6/1/2024
2.1.358 84 6/1/2024
2.1.357 82 6/1/2024
2.1.356 78 6/1/2024
2.1.355 85 5/31/2024
2.1.354 78 5/31/2024
2.1.353 65 5/31/2024
2.1.352 79 5/31/2024
2.1.351 80 5/29/2024
2.1.350 72 5/29/2024
2.1.349 73 5/28/2024
2.1.348 74 5/28/2024
2.1.347 73 5/28/2024
2.1.346 75 5/28/2024
2.1.345 76 5/28/2024
2.1.344 74 5/27/2024
2.1.343 78 5/27/2024
2.1.342 71 5/27/2024
2.1.341 79 5/26/2024
2.1.340 80 5/26/2024
2.1.339 72 5/26/2024
2.1.338 85 5/26/2024
2.1.337 84 5/26/2024
2.1.336 81 5/26/2024
2.1.335 86 5/25/2024
2.1.334 85 5/25/2024
2.1.333 79 5/25/2024
2.1.332 83 5/25/2024
2.1.331 77 5/25/2024
2.1.330 83 5/25/2024
2.1.329 83 5/23/2024
2.1.328 82 5/23/2024
2.1.327 65 5/23/2024
2.1.326 82 5/23/2024
2.1.325 79 5/23/2024
2.1.324 89 5/23/2024
2.1.323 79 5/22/2024
2.1.322 86 5/22/2024
2.1.321 80 5/22/2024
2.1.320 74 5/22/2024
2.1.319 82 5/18/2024
2.1.318 81 5/18/2024
2.1.317 74 5/18/2024
2.1.316 78 5/18/2024
2.1.315 84 5/17/2024
2.1.314 90 5/17/2024
2.1.313 82 5/17/2024
2.1.312 78 5/16/2024
2.1.311 85 5/16/2024
2.1.310 90 5/15/2024
2.1.309 77 5/15/2024
2.1.308 92 5/15/2024
2.1.307 84 5/13/2024
2.1.306 86 5/13/2024
2.1.305 65 5/13/2024
2.1.304 95 4/30/2024
2.1.303 82 4/30/2024
2.1.302 88 4/30/2024
2.1.301 90 4/30/2024
2.1.300 74 4/29/2024
2.1.299 81 4/29/2024
2.1.298 77 4/29/2024
2.1.297 74 4/29/2024
2.1.296 80 4/28/2024
2.1.295 91 4/28/2024
2.1.294 89 4/28/2024
2.1.293 84 4/28/2024
2.1.292 78 4/28/2024
2.1.291 81 4/28/2024
2.1.290 77 4/28/2024
2.1.289 83 4/27/2024
2.1.288 100 4/27/2024
2.1.287 87 4/20/2024
2.1.286 80 4/20/2024
2.1.285 76 4/19/2024
2.1.284 75 4/19/2024
2.1.283 77 4/19/2024
2.1.282 80 4/19/2024
2.1.281 78 4/18/2024
2.1.280 85 4/13/2024
2.1.279 72 4/13/2024
2.1.278 79 4/13/2024
2.1.277 69 4/12/2024
2.1.276 66 4/12/2024
2.1.275 63 4/12/2024
2.1.274 64 4/12/2024
2.1.273 64 4/12/2024
2.1.272 64 4/12/2024
2.1.271 75 4/12/2024
2.1.270 65 4/12/2024
2.1.269 72 4/11/2024
2.1.268 80 4/10/2024
2.1.267 70 4/10/2024
2.1.266 72 4/10/2024
2.1.265 77 4/10/2024
2.1.264 70 4/10/2024
2.1.263 92 4/3/2024
2.1.262 78 4/3/2024
2.1.261 334 3/30/2024
2.1.260 80 3/29/2024
2.1.259 88 3/29/2024
2.1.258 84 3/25/2024
2.1.257 84 3/25/2024
2.1.256 84 3/25/2024
2.1.255 76 3/25/2024
2.1.254 86 3/25/2024
2.1.253 80 3/21/2024
2.1.252 81 3/21/2024
2.1.251 90 3/21/2024
2.1.250 77 3/20/2024
2.1.249 85 3/20/2024
2.1.248 90 3/19/2024
2.1.247 65 3/19/2024
2.1.246 80 3/19/2024
2.1.245 71 3/19/2024
2.1.244 79 3/19/2024
2.1.243 92 3/19/2024
2.1.242 79 3/18/2024
2.1.241 83 3/16/2024
2.1.240 80 3/16/2024
2.1.239 88 3/16/2024
2.1.238 88 3/15/2024
2.1.237 81 3/13/2024
2.1.236 87 3/13/2024
2.1.235 80 3/13/2024
2.1.234 82 3/13/2024
2.1.233 83 3/13/2024
2.1.232 87 3/13/2024
2.1.231 89 3/13/2024
2.1.230 82 3/13/2024
2.1.229 87 3/12/2024
2.1.228 90 3/12/2024
2.1.227 79 3/12/2024
2.1.226 91 3/12/2024
2.1.225 77 3/11/2024
2.1.224 79 3/11/2024
2.1.223 95 3/11/2024
2.1.222 74 3/11/2024
2.1.221 67 3/11/2024
2.1.220 90 3/10/2024
2.1.219 86 3/10/2024
2.1.218 89 3/10/2024
2.1.217 80 3/10/2024
2.1.216 101 3/9/2024
2.1.215 91 3/8/2024
2.1.214 84 3/8/2024
2.1.213 95 3/8/2024
2.1.212 83 3/8/2024
2.1.211 82 3/8/2024
2.1.210 77 3/8/2024
2.1.209 97 3/6/2024
2.1.208 90 3/6/2024
2.1.207 81 3/6/2024
2.1.206 85 3/4/2024
2.1.205 75 3/4/2024
2.1.204 82 3/4/2024
2.1.203 80 3/4/2024
2.1.202 71 3/4/2024
2.1.201 80 3/3/2024
2.1.200 87 3/3/2024
2.1.199 90 3/3/2024
2.1.198 89 3/3/2024
2.1.197 82 3/2/2024
2.1.196 82 3/2/2024
2.1.195 74 2/29/2024
2.1.194 77 2/29/2024
2.1.193 75 2/29/2024
2.1.192 70 2/29/2024
2.1.191 78 2/29/2024
2.1.190 74 2/29/2024
2.1.189 68 2/29/2024
2.1.188 88 2/29/2024
2.1.187 73 2/27/2024
2.1.186 67 2/26/2024
2.1.185 52 2/26/2024
2.1.184 76 2/25/2024
2.1.183 70 2/25/2024
2.1.182 68 2/25/2024
2.1.181 82 2/25/2024
2.1.180 80 2/25/2024
2.1.179 75 2/24/2024
2.1.178 68 2/23/2024
2.1.177 72 2/23/2024
2.1.176 75 2/22/2024
2.1.175 70 2/22/2024
2.1.174 73 2/22/2024
2.1.173 59 2/22/2024
2.1.172 73 2/22/2024
2.1.171 73 2/22/2024
2.1.170 73 2/21/2024
2.1.169 72 2/21/2024
2.1.168 67 2/21/2024
2.1.167 84 2/21/2024
2.1.166 97 2/21/2024
2.1.165 81 2/21/2024
2.1.164 70 2/21/2024
2.1.163 90 2/20/2024
2.1.162 72 2/20/2024
2.1.161 80 2/20/2024
2.1.160 83 2/20/2024
2.1.159 85 2/20/2024
2.1.158 77 2/20/2024
2.1.157 80 2/20/2024
2.1.156 67 2/20/2024
2.1.155 72 2/19/2024
2.1.154 68 2/19/2024
2.1.153 74 2/19/2024
2.1.152 61 2/19/2024
2.1.151 85 2/17/2024
2.1.150 72 2/17/2024
2.1.149 76 2/17/2024
2.1.148 73 2/17/2024
2.1.147 86 2/17/2024
2.1.146 68 2/16/2024
2.1.145 82 2/16/2024
2.1.144 59 2/16/2024
2.1.143 85 2/16/2024
2.1.142 65 2/16/2024
2.1.141 80 2/16/2024
2.1.140 72 2/16/2024
2.1.139 79 2/14/2024
2.1.138 85 2/14/2024
2.1.137 87 2/14/2024
2.1.136 86 2/14/2024
2.1.135 73 2/13/2024
2.1.134 86 2/13/2024
2.1.133 70 2/13/2024
2.1.132 84 2/13/2024
2.1.131 69 2/13/2024
2.1.130 84 2/13/2024
2.1.129 78 2/12/2024
2.1.128 81 2/12/2024
2.1.127 81 2/12/2024
2.1.126 87 2/12/2024
2.1.125 83 2/11/2024
2.1.124 84 2/11/2024
2.1.123 81 2/11/2024
2.1.122 85 2/11/2024
2.1.121 79 2/11/2024
2.1.120 79 2/11/2024
2.1.119 87 2/10/2024
2.1.118 85 2/10/2024
2.1.117 81 2/10/2024
2.1.116 85 2/10/2024
2.1.115 86 2/10/2024
2.1.114 81 2/9/2024
2.1.113 81 2/9/2024
2.1.112 85 2/9/2024
2.1.111 85 2/9/2024
2.1.110 89 2/9/2024
2.1.109 82 2/9/2024
2.1.108 81 2/9/2024
2.1.107 91 2/8/2024
2.1.106 81 2/8/2024
2.1.105 77 2/8/2024
2.1.104 81 2/8/2024
2.1.103 82 2/8/2024
2.1.102 86 2/7/2024
2.1.101 89 2/7/2024
2.1.100 81 2/7/2024
2.1.99 77 2/7/2024
2.1.98 79 2/7/2024
2.1.97 81 2/7/2024
2.1.96 81 2/7/2024
2.1.95 84 2/7/2024
2.1.94 81 2/6/2024
2.1.93 77 2/6/2024
2.1.92 80 2/6/2024
2.1.91 78 2/5/2024
2.1.90 75 2/5/2024
2.1.89 83 2/4/2024
2.1.88 73 2/4/2024
2.1.87 74 2/3/2024
2.1.86 79 2/3/2024
2.1.85 78 1/31/2024
2.1.84 76 1/31/2024
2.1.83 73 1/31/2024
2.1.82 66 1/31/2024
2.1.81 83 1/30/2024
2.1.80 80 1/30/2024
2.1.79 76 1/30/2024
2.1.78 73 1/29/2024
2.1.77 78 1/29/2024
2.1.76 76 1/29/2024
2.1.75 74 1/29/2024
2.1.74 68 1/29/2024
2.1.73 81 1/29/2024
2.1.72 77 1/28/2024
2.1.71 80 1/28/2024
2.1.70 75 1/28/2024
2.1.69 79 1/28/2024
2.1.68 77 1/28/2024
2.1.67 75 1/28/2024
2.1.66 78 1/27/2024
2.1.65 76 1/27/2024
2.1.64 77 1/27/2024
2.1.63 75 1/27/2024
2.1.62 76 1/27/2024
2.1.61 76 1/27/2024
2.1.60 64 1/27/2024
2.1.59 77 1/27/2024
2.1.58 77 1/26/2024
2.1.57 74 1/26/2024
2.1.56 76 1/26/2024
2.1.55 75 1/26/2024
2.1.54 73 1/26/2024
2.1.53 81 1/26/2024
2.1.52 77 1/25/2024
2.1.51 72 1/25/2024
2.1.50 76 1/25/2024
2.1.49 79 1/25/2024
2.1.48 72 1/25/2024
2.1.47 76 1/25/2024
2.1.46 86 1/19/2024
2.1.45 81 1/19/2024
2.1.44 71 1/19/2024
2.1.43 98 1/16/2024
2.1.42 90 1/16/2024
2.1.41 70 1/15/2024
2.1.40 86 1/15/2024
2.1.39 91 1/15/2024
2.1.38 85 1/15/2024
2.1.37 85 1/15/2024
2.1.36 82 1/15/2024
2.1.35 93 1/15/2024
2.1.34 83 1/14/2024
2.1.33 82 1/14/2024
2.1.32 87 1/13/2024
2.1.31 84 1/13/2024
2.1.30 80 1/13/2024
2.1.29 88 1/13/2024
2.1.28 86 1/12/2024
2.1.27 89 1/12/2024
2.1.26 88 1/12/2024
2.1.25 85 1/11/2024
2.1.24 93 1/11/2024
2.1.23 101 1/11/2024
2.1.22 97 1/9/2024
2.1.21 105 1/8/2024
2.1.20 91 1/8/2024
2.1.19 97 1/8/2024
2.1.18 105 1/7/2024
2.1.17 101 1/6/2024
2.1.16 105 1/5/2024
2.1.15 101 1/5/2024
2.1.14 90 1/5/2024
2.1.13 96 1/5/2024
2.1.12 100 1/5/2024
2.1.11 76 1/1/2024
2.1.10 78 1/1/2024
2.1.9 81 1/1/2024
2.1.8 77 1/1/2024
2.1.7 83 1/1/2024
2.1.6 106 12/31/2023
2.1.5 93 12/31/2023
2.1.4 102 12/31/2023
2.1.3 81 12/31/2023
2.1.2 80 12/31/2023
2.1.1 87 12/31/2023