GithubHelp home page GithubHelp logo

Comments (6)

burdoto avatar burdoto commented on September 21, 2024 1

Honestly, B scoring as much as BlackBerry for the string Berry seems very reasonable to me.

Each Ratio and Algorithm also implements Applicable, so you should try using the Extractor class directly and passing an instance of the TokenSort algorithm, like this:

var extractor = new Extractor();
Object bestMatch = extractor.extractOne("Berry", values, new TokenSort());

from fuzzywuzzy.

burdoto avatar burdoto commented on September 21, 2024

FuzzyWuzzy features the Ratios as standalone classes, and a set of classes for algorithms.

I think https://github.com/xdrop/fuzzywuzzy/blob/master/src/me/xdrop/fuzzywuzzy/algorithms/TokenSort.java is the one that you are looking for.

from fuzzywuzzy.

Zaky7 avatar Zaky7 commented on September 21, 2024

@burdoto I am in a situation where the fuzzy match is not giving me acceptable results

 val query = "Berry"
    val searchKeys = listOf("B", "ARRY", "AGEN", "Abercrombie & Fitch Company", "BlackBerry Limited")
    val result = FuzzySearch.extractTop(query, searchKeys, 5)
    result.forEach { extractedResult: ExtractedResult ->
        println(extractedResult)
    }

Output

(string: B, score: 90, index: 0)
(string: BlackBerry Limited, score: 90, index: 4)
(string: Abercrombie & Fitch Company, score: 72, index: 3)
(string: ARRY, score: 67, index: 1)
(string: AGEN, score: 22, index: 2)

I don't know why B has a score of 90. I need to dig deeper, If you have suggestions regarding this, they are welcome

Currently I am thing of tweaking the score to get results

from fuzzywuzzy.

Zaky7 avatar Zaky7 commented on September 21, 2024

Thanks, man :)

from fuzzywuzzy.

Zaky7 avatar Zaky7 commented on September 21, 2024

@burdoto can you comment on how much this library is similar to Python Fuzzywuzzy. I have a lot of scorer on fuzzy wuzzy side.

from fuzzywuzzy.

burdoto avatar burdoto commented on September 21, 2024

As far as I know, this is an as-perfect-as-it-gets source port of the library. It even features bugs that are inside the original! 🥳
I might be wrong on this though.

from fuzzywuzzy.

Related Issues (20)

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.