Giter Club home page Giter Club logo

Comments (4)

jeancroy avatar jeancroy commented on July 30, 2024

Can you expand your idea of "if it fit a minimum" ?

from fuzzysearch.

Hasan-git avatar Hasan-git commented on July 30, 2024

Sorry for being late,
I have a contact records( name, phone and birthday), I am trying to figure a way to check if a contact is highly possible duplicate through these inputs against persisted contact records.

I am grateful for you!

from fuzzysearch.

Hasan-git avatar Hasan-git commented on July 30, 2024

is there a way to calculate Similarity Score relative to 1.
Example : if searching for a name like "forda", I expect to get result as the image below

image

from fuzzysearch.

jeancroy avatar jeancroy commented on July 30, 2024

I have written a section on why I score the way I do.
https://github.com/jeancroy/FuzzySearch#scoring-a-token-in-a-auto-complete-friendly-manner

  • Basically I found basic string similarity measure (like your example) unreliable when comparing result of very different size. I do use such measure, just add another layer of relative size.
  • In a auto complete scenario, I also want to match end of words for a very low cost.
  • There's also another layer to handle multiple words and multiple field which is really implemented as more is better, and max score among competing options.
  • Finally there's some amount of products / help page recommendation assumptions, so I really prefers to show something vaguely related over nothing.

I understand some of those assumptions are different from what you would want in a auto-de-duplication scenario.

You could score the query against itself and divide all the score by this maximal(?) one.
See how far that takes you. If you want more basic LCS score, there's plenty of library that'll do that.


The individual word score works like this:
m = size A
n = size B
lcs_len = max number of character in common in proper order
prefix = max number of character in common at the start of word.

var sz = (m + n) / ( 2.0 * m * n);
scores[k] = sz * lcs_len * lcs_len + bonus_prefix * prefix;

from fuzzysearch.

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.