Soenneker.Utils.Strings.LevenshteinDistance 3.0.249

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.Strings.LevenshteinDistance --version 3.0.249
                    
NuGet\Install-Package Soenneker.Utils.Strings.LevenshteinDistance -Version 3.0.249
                    
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.Strings.LevenshteinDistance" Version="3.0.249" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.Strings.LevenshteinDistance" Version="3.0.249" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.Strings.LevenshteinDistance" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Utils.Strings.LevenshteinDistance --version 3.0.249
                    
#r "nuget: Soenneker.Utils.Strings.LevenshteinDistance, 3.0.249"
                    
#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.
#:package Soenneker.Utils.Strings.LevenshteinDistance@3.0.249
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Utils.Strings.LevenshteinDistance&version=3.0.249
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.Strings.LevenshteinDistance&version=3.0.249
                    
Install as a Cake Tool

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.Strings.LevenshteinDistance

A utility library for comparing strings via the Levenshtein Distance algorithm

Installation

dotnet add package Soenneker.Utils.Strings.LevenshteinDistance

Why Levenshtein Distance?

Levenshtein Distance, also known as Edit Distance, is a widely used metric for measuring the similarity between two strings. It calculates the minimum number of operations required to transform one string into the other, where operations include:

  • Insertion of a character.
  • Deletion of a character.
  • Substitution of a character.

Levenshtein Distance is particularly useful in applications like:

Flexible String Comparison:

It handles strings of unequal length and allows for more flexible comparisons.

Real-World Scenarios:

It's well-suited for tasks like:

  • Fuzzy string matching.
  • Spelling correction.
  • DNA sequence analysis.
  • Natural language processing.

Position-Aware:

It captures positional changes and structural differences more effectively than set-based metrics like Jaccard or Hamming Distance.

Comprehensive Error Handling:

Unlike simpler metrics, it accounts for insertions and deletions, making it robust for strings with typos or omissions.


Usage

var text1 = "kitten";
var text2 = "sitting";

int distance = LevenshteinDistanceUtil.ComputeDistance(text1, text2); // 3
double similarityPercentage = LevenshteinDistanceUtil.CalculatePercentage(text1, text2); // ~57.14

This library is efficient, straightforward, and ideal for handling real-world string similarity comparisons where flexibility and accuracy are key.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • 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
3.0.307 173 9/3/2025
3.0.306 158 8/11/2025
3.0.305 114 6/27/2025
3.0.304 184 5/27/2025
3.0.303 188 5/22/2025
3.0.302 197 5/7/2025
3.0.301 173 5/5/2025
3.0.300 181 5/5/2025
3.0.299 184 5/5/2025
3.0.298 193 4/8/2025
3.0.297 192 4/8/2025
3.0.296 183 4/8/2025
3.0.295 196 4/8/2025
3.0.294 186 4/8/2025
3.0.293 199 4/8/2025
3.0.292 201 4/7/2025
3.0.291 198 4/7/2025
3.0.290 171 4/7/2025
3.0.289 186 4/7/2025
3.0.288 194 4/7/2025
3.0.287 195 4/7/2025
3.0.286 194 4/7/2025
3.0.285 201 4/7/2025
3.0.284 189 4/6/2025
3.0.283 197 4/6/2025
3.0.282 176 4/6/2025
3.0.281 188 4/6/2025
3.0.280 155 4/6/2025
3.0.279 151 4/6/2025
3.0.278 147 4/5/2025
3.0.277 111 4/5/2025
3.0.276 120 4/5/2025
3.0.275 120 4/5/2025
3.0.274 131 4/5/2025
3.0.273 135 4/5/2025
3.0.272 123 4/5/2025
3.0.271 142 4/4/2025
3.0.270 204 4/4/2025
3.0.269 188 4/1/2025
3.0.268 177 3/31/2025
3.0.267 195 3/31/2025
3.0.266 119 3/29/2025
3.0.265 504 3/25/2025
3.0.264 513 3/25/2025
3.0.263 171 3/21/2025
3.0.262 186 3/18/2025
3.0.261 189 3/18/2025
3.0.260 110 3/15/2025
3.0.259 98 3/15/2025
3.0.258 101 3/15/2025
3.0.257 202 3/12/2025
3.0.256 191 3/12/2025
3.0.255 205 3/12/2025
3.0.254 214 3/11/2025
3.0.253 178 3/11/2025
3.0.252 208 3/11/2025
3.0.251 207 3/11/2025
3.0.250 191 3/11/2025
3.0.249 270 3/7/2025
3.0.248 253 3/7/2025
3.0.247 136 3/2/2025
3.0.246 127 3/2/2025
3.0.245 140 3/2/2025
3.0.244 133 3/2/2025
3.0.243 144 3/2/2025
3.0.242 142 3/1/2025
3.0.241 143 3/1/2025
3.0.240 104 3/1/2025
3.0.239 107 3/1/2025
3.0.238 140 3/1/2025
3.0.237 128 2/25/2025
3.0.236 148 2/25/2025
3.0.235 141 2/25/2025
3.0.234 111 2/25/2025
3.0.233 142 2/24/2025
3.0.232 141 2/23/2025
3.0.231 136 2/23/2025
3.0.230 146 2/22/2025
3.0.229 136 2/22/2025
3.0.228 143 2/22/2025
3.0.227 150 2/22/2025
3.0.226 120 2/22/2025
3.0.225 138 2/22/2025
3.0.224 130 2/21/2025
3.0.223 137 2/21/2025
3.0.222 142 2/19/2025
3.0.221 142 2/19/2025
3.0.220 142 2/19/2025
3.0.219 146 2/19/2025
3.0.218 149 2/18/2025
3.0.217 140 2/18/2025
3.0.216 145 2/18/2025
3.0.215 143 2/14/2025
3.0.214 153 2/14/2025
3.0.213 158 2/13/2025
3.0.212 147 2/12/2025
3.0.211 150 2/12/2025
3.0.210 149 2/12/2025
3.0.209 152 2/12/2025
3.0.208 132 2/12/2025
3.0.207 147 2/11/2025
3.0.206 153 2/11/2025
3.0.205 153 2/11/2025
3.0.204 145 2/11/2025
3.0.203 133 2/11/2025
3.0.202 126 2/10/2025
3.0.201 155 2/10/2025
3.0.200 162 2/10/2025
3.0.199 140 2/10/2025
3.0.198 145 2/10/2025
3.0.197 153 2/9/2025
3.0.196 134 2/8/2025
3.0.195 125 2/8/2025
3.0.194 135 2/8/2025
3.0.193 136 2/8/2025
3.0.192 122 2/8/2025
3.0.191 116 2/7/2025
3.0.190 126 2/7/2025
3.0.189 149 2/7/2025
3.0.188 132 2/7/2025
3.0.187 142 2/7/2025
3.0.186 151 2/7/2025
3.0.185 138 2/7/2025
3.0.184 138 2/7/2025
3.0.183 135 2/6/2025
3.0.182 122 2/5/2025
3.0.181 138 2/5/2025
3.0.180 133 2/5/2025
3.0.179 144 2/5/2025
3.0.178 131 2/5/2025
3.0.177 132 2/5/2025
3.0.176 149 2/5/2025
3.0.175 143 1/28/2025
3.0.174 136 1/28/2025
3.0.173 133 1/28/2025
3.0.172 129 1/28/2025
3.0.171 115 1/27/2025
3.0.170 133 1/27/2025
3.0.169 130 1/26/2025
3.0.168 129 1/26/2025
3.0.167 133 1/26/2025
3.0.166 122 1/25/2025
3.0.165 138 1/25/2025
3.0.164 145 1/25/2025
3.0.163 133 1/25/2025
3.0.162 132 1/25/2025
3.0.161 123 1/25/2025
3.0.160 124 1/24/2025
3.0.159 114 1/24/2025
3.0.158 135 1/24/2025
3.0.157 128 1/24/2025
3.0.156 140 1/24/2025
3.0.155 119 1/23/2025
3.0.154 149 1/23/2025
3.0.153 142 1/21/2025
3.0.152 123 1/21/2025
3.0.151 126 1/21/2025
3.0.150 140 1/21/2025
3.0.149 147 1/21/2025
3.0.148 124 1/21/2025
3.0.147 150 1/21/2025
3.0.146 141 1/20/2025
3.0.145 112 1/20/2025
3.0.144 140 1/20/2025
3.0.143 133 1/20/2025
3.0.142 149 1/20/2025
3.0.141 137 1/20/2025
3.0.140 122 1/19/2025
3.0.139 130 1/19/2025
3.0.138 128 1/19/2025
3.0.137 120 1/19/2025
3.0.136 113 1/19/2025
3.0.135 105 1/19/2025
3.0.134 98 1/19/2025
3.0.133 134 1/18/2025
3.0.132 137 1/18/2025
3.0.131 128 1/18/2025
3.0.130 131 1/18/2025
3.0.129 132 1/17/2025
3.0.128 120 1/17/2025
3.0.127 128 1/17/2025
3.0.126 134 1/17/2025
3.0.125 108 1/17/2025
3.0.124 133 1/17/2025
3.0.123 136 1/16/2025
3.0.122 134 1/16/2025
3.0.121 121 1/16/2025
3.0.120 133 1/16/2025
3.0.119 118 1/16/2025
3.0.118 135 1/16/2025
3.0.117 137 1/15/2025
3.0.116 133 1/15/2025
3.0.115 121 1/15/2025
3.0.114 118 1/15/2025
3.0.113 97 1/15/2025
3.0.112 109 1/15/2025
3.0.111 108 1/15/2025
3.0.110 97 1/15/2025
3.0.109 104 1/14/2025
3.0.108 89 1/14/2025
3.0.107 100 1/14/2025
3.0.106 138 1/14/2025
3.0.105 122 1/13/2025
3.0.104 116 1/13/2025
3.0.103 127 1/12/2025
3.0.102 133 1/11/2025
3.0.101 148 1/11/2025
3.0.100 133 1/11/2025
3.0.99 138 1/10/2025
3.0.98 150 1/10/2025
3.0.97 126 1/10/2025
3.0.96 128 1/10/2025
3.0.95 148 1/3/2025
3.0.94 156 1/3/2025
3.0.93 135 1/3/2025
3.0.92 146 1/3/2025
3.0.91 137 1/2/2025
3.0.90 140 1/2/2025
3.0.89 140 1/2/2025
3.0.88 141 1/2/2025
3.0.87 150 1/1/2025
3.0.86 148 1/1/2025
3.0.85 133 1/1/2025
3.0.84 151 1/1/2025
3.0.83 131 1/1/2025
3.0.82 144 1/1/2025
3.0.81 144 12/31/2024
3.0.80 152 12/31/2024
3.0.79 162 12/31/2024
3.0.77 151 12/31/2024
3.0.76 174 12/31/2024
3.0.75 157 12/31/2024
3.0.74 142 12/31/2024
3.0.73 140 12/31/2024
3.0.72 136 12/31/2024
3.0.71 160 12/31/2024
3.0.70 143 12/31/2024
3.0.69 135 12/30/2024
3.0.68 143 12/28/2024
3.0.67 139 12/28/2024
3.0.66 147 12/27/2024
3.0.65 150 12/27/2024
3.0.64 139 12/24/2024
3.0.63 141 12/24/2024
3.0.62 138 12/24/2024
3.0.61 129 12/24/2024
3.0.60 137 12/24/2024
3.0.59 137 12/24/2024
3.0.58 128 12/24/2024
3.0.57 144 12/24/2024
3.0.56 143 12/24/2024
3.0.55 139 12/24/2024
3.0.54 123 12/23/2024
3.0.53 127 12/23/2024
3.0.52 140 12/23/2024
3.0.51 130 12/23/2024
3.0.50 152 12/23/2024
3.0.49 148 12/23/2024
3.0.48 145 12/22/2024
3.0.47 140 12/22/2024
3.0.46 164 12/22/2024
3.0.45 131 12/22/2024
3.0.44 141 12/22/2024
3.0.43 149 12/22/2024
3.0.42 133 12/22/2024
3.0.41 136 12/21/2024
3.0.40 140 12/21/2024
3.0.39 149 12/21/2024
3.0.38 147 12/21/2024
3.0.37 151 12/21/2024
3.0.36 129 12/21/2024
3.0.35 150 12/20/2024
3.0.34 133 12/20/2024
3.0.33 145 12/20/2024
3.0.32 144 12/20/2024
3.0.31 133 12/20/2024
3.0.30 150 12/19/2024
3.0.29 124 12/19/2024
3.0.28 139 12/19/2024
3.0.27 157 12/18/2024
3.0.26 144 12/18/2024
3.0.25 128 12/16/2024
3.0.24 139 12/16/2024
3.0.23 154 12/10/2024
3.0.22 151 12/10/2024
3.0.21 133 12/10/2024
3.0.20 152 12/9/2024
3.0.19 151 12/9/2024
3.0.18 134 12/9/2024
3.0.17 136 12/9/2024
3.0.16 157 12/7/2024
3.0.15 167 12/6/2024
3.0.14 143 12/6/2024
3.0.13 141 12/6/2024
3.0.12 136 12/6/2024
3.0.11 166 12/6/2024
3.0.10 161 12/6/2024
3.0.9 149 12/6/2024
3.0.8 143 12/6/2024
3.0.7 159 12/6/2024
3.0.6 155 12/6/2024
3.0.5 148 12/6/2024
3.0.4 158 12/6/2024
3.0.3 140 12/5/2024
3.0.2 152 12/5/2024
3.0.1 157 12/4/2024