tylerjensen / fuzzystrings Goto Github PK
View Code? Open in Web Editor NEWFuzzy String Algorithms for .NET
Home Page: http://www.duovia.net
Fuzzy String Algorithms for .NET
Home Page: http://www.duovia.net
Is it possible to add a SNK to the generated assembly?
This can be demonstrated by the below code snippet:
var testString = "aaaaaaaaa";
var diceCoefficient = testString.DiceCoefficient(testString);
Assert.Equal(1, diceCoefficient);
The test fails. The reason is Intersect returns the distinct overlapping bigrams. But you then divide by the number of bigrams in the two strings including duplicates, which is incorrect.
"78135".LevenshteinDistance("75130") should be 2 (8,5 and 5,0), but returns 1.
however
"78135x".LevenshteinDistance("75130x") correctly returns 2.
Seems to be some issue around the 'W' character. These calls generate IndexOutOfRangeExceptions:
"test".FuzzyMatch("w");
"test".FuzzyMatch("W");
"test".FuzzyMatch("w ");
"test".FuzzyMatch("W ");
"test".FuzzyMatch(" w");
"test".FuzzyMatch(" W");
"test".FuzzyMatch(" w ");
"test".FuzzyMatch(" W ");
Tested in .NET 4.5 using the 1.0.0 Nuget package.
FuzzyEquals and FuzzyMatches does not work with hebrew charachters - and seem to ignore them.
However other fuzzy methods like DiceCoefficient work well.
sample code:
string str1 = "אבג";
string str2 = str1;
Console.WriteLine(str1.FuzzyEquals(str2));
Console.WriteLine(str1.FuzzyMatch(str2));
str1 = "abc";
str2 = str1;
Console.WriteLine(str1.FuzzyEquals(str2));
Console.WriteLine(str1.FuzzyMatch(str2));
Results:
False
-0.0625
True
0.999999
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.