Coder Social home page Coder Social logo

fuzzystrings's People

Contributors

13xforever avatar simonness avatar tylerje avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fuzzystrings's Issues

FuzzyEquals not working for hebrew charachters

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

IndexOutOfRangeException on specific inputs

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.

Strong name?

Is it possible to add a SNK to the generated assembly?

Repeating bigrams handled incorrectly

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.

https://github.com/tylerjensen/FuzzyStrings/blob/master/src/DuoVia.FuzzyStrings/DuoVia.FuzzyStrings/DiceCoefficientExtensions.cs#L36

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.