Soenneker.Utils.Strings.LevenshteinDistance 3.0.301

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