FuzzyCompare 0.2.9

dotnet add package FuzzyCompare --version 0.2.9
NuGet\Install-Package FuzzyCompare -Version 0.2.9
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="FuzzyCompare" Version="0.2.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FuzzyCompare --version 0.2.9
#r "nuget: FuzzyCompare, 0.2.9"
#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.
// Install FuzzyCompare as a Cake Addin
#addin nuget:?package=FuzzyCompare&version=0.2.9

// Install FuzzyCompare as a Cake Tool
#tool nuget:?package=FuzzyCompare&version=0.2.9

FuzzyCompare

Fuzzy string comparison library

Downloads NuGet MIT

ComparisonMethods

The class provides three static methods:

  • JaroSimilarity: calculates the Jaro similarity between two given ReadOnlySpan<char> inputs. It returns a float value that ranges from 0 to 1, representing the similarity between the two inputs.
  • JaroWinklerSimilarity: calculates the Jaro-Winkler similarity between two given ReadOnlySpan<char> inputs. It returns a float value that ranges from 0 to 1, representing the similarity between the two inputs. The p parameter is optional and it sets the scaling factor for the common prefix length adjustment.
  • LevenshteinDistance: calculates the Levenshtein distance between two given ReadOnlySpan<char> inputs. It returns an int value that represents the minimum number of single-character edits (insertions, deletions, or substitutions) required to change one input into the other.

FuzzyStringComparer

The FuzzyStringComparer class provides a way to compare strings using a fuzzy matching algorithm. The main purpose of the FuzzyStringComparer class is to determine the similarity between two strings, by calculating a similarity score based on the number of matching characters and their positions within the strings.

It provides a constructor that takes an optional CultureInfo parameter, which can be used to specify the culture to use for string comparison. By default, the FuzzyStringComparer class uses the current culture for case-insensitive string comparison.

The FuzzyStringComparer class uses a fuzzy matching algorithm that takes into account several factors, including the length of the strings, the number of matching characters, and the positions of the matching characters within the strings. The algorithm is designed to be tolerant of small differences between the strings, such as typos, misspellings, or minor variations in formatting.

Tokenizer

The Tokenizer class is a utility class that provides methods for tokenizing strings and spans of characters. The main purpose of the class is to break down a string or span of characters into individual tokens, which are then returned as a token enumerator.

The class provides two main methods for tokenizing strings and spans of characters: Tokenize and EnumerateTokens. The Tokenize method takes a string as input and returns an TokenEnumerator object that can be used to iterate through the tokens in the string. The EnumerateTokens method takes a read-only span of characters as input and returns a TokenRefEnumerator object that can be used to iterate through the tokens in the span.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on FuzzyCompare:

Package Downloads
ReadabilityLib

A C# port of standalone version of the readability lib

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.9 114 2/22/2024
0.2.8 85 2/5/2024
0.2.7-beta 111 5/13/2023
0.2.6-beta 99 5/9/2023
0.1.0-beta 94 5/7/2023