Soenneker.Utils.Strings.LevenshteinDistance 3.0.281

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