Fuzzy string matching for C# based on FuzzyWuzzy Python algorithm. The algorithm uses Levenshtein distance to calculate similarity between strings.
This project is a port of the JavaWuzzy implementation because of the language similarities.
The FuzzySharp library is a .netstandard 1.0 project. To run the unit tests you will need .netcore 2.0.
Available on nuget.org
Benefits of this project include
- No Dependencies!
- Can be used in full .Net (>4.5) or .Net Core (>1.0) applications!
Fuzzy.Ratio("hello world", "hello word");
95
Fuzzy.PartialRatio("my new test", "these are my new test strings");
100
Fuzzy.Ratio("HelLO woRld!!", "hello word", StringOptions.CaseSensitive, StringOptions.PreserveNonAlphaNumeric);
52
Fuzzy.TokenSortPartialRatio("order words out of", "words out of order");
100
Fuzzy.TokenSortRatio("order words out of", "word out of order");
97
Fuzzy.TokenSetPartialRatio("fuzzy was a bear", "fuzzy fuzzy was a bear");
100
Fuzzy.TokenSetRatio("fuzzy was a bear", "fuzzy fuzzy was a bear");
100
Fuzzy.WeightedRatio("ratios are awesomething things", "ratios solve things and problems");
65
- SeatGeek for coming up with the initial algorithm
- XDrop for converting Python to Java
- Anyone who worked on the original python-levenshtein project