Soenneker.Utils.Strings.LevenshteinDistance 3.0.306

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