Soenneker.Utils.Strings.LevenshteinDistance 3.0.116

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