Soenneker.Utils.Strings.LevenshteinDistance 3.0.157

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