-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb9f7e1
commit 67abf13
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# JaroWinklerSimilarity Class | ||
|
||
**Static class providing extension methods for calculating the Jaro-Winkler similarity between two strings.** | ||
|
||
## Class Members | ||
|
||
```csharp | ||
CalculateJaroWinklerSimilarity( | ||
string str1, | ||
string str2) | ||
``` | ||
|
||
Calculates the Jaro-Winkler similarity between two strings. | ||
|
||
### Parameters | ||
|
||
- `str1` (Type: `string`): The first string for comparison. | ||
- `str2` (Type: `string`): The second string for comparison. | ||
|
||
### Returns | ||
|
||
- Type: `double` | ||
- Description: A double value representing the similarity between the two strings, ranging from 0.0 to 1.0. | ||
|
||
### Example | ||
|
||
```csharp | ||
using NetPlus.Algorithms.Comparison; | ||
|
||
// Example strings | ||
string str1 = "Hello World"; | ||
string str2 = "Hello"; | ||
|
||
// Calculating Jaro-Winkler similarity | ||
double similarity = str1.CalculateJaroWinklerSimilarity(str2); | ||
|
||
// Displaying similarity | ||
Console.WriteLine(similarity); | ||
``` | ||
|
||
### Usage | ||
|
||
To use the `JaroWinklerSimilarity` class, simply call the `CalculateJaroWinklerSimilarity` method with the appropriate parameters. | ||
|
||
```csharp | ||
// Example usage | ||
double similarity = str1.CalculateJaroWinklerSimilarity(str2); | ||
``` | ||
|
||
### Remarks | ||
|
||
The `JaroWinklerSimilarity` class uses the Jaro-Winkler similarity algorithm to calculate the similarity between two strings. It returns a double value representing the similarity between the two strings, ranging from 0.0 to 1.0. |