Comments (4)
Can you expand your idea of "if it fit a minimum" ?
from fuzzysearch.
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.
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
from fuzzysearch.
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)
- Highlight exact search query HOT 1
- Scoring items higher / grouping results HOT 2
- synonyms substitute HOT 1
- Sort by Length HOT 1
- How can i do it with post method? and mysql HOT 1
- install in nodejs HOT 1
- `remove()` to complement `add()` ? HOT 2
- how do you select the matcing items? HOT 1
- dynamically adjusting json source HOT 8
- debug mode HOT 1
- hiding html comments HOT 2
- using a different UI HOT 2
- intelligently caching the JSON data HOT 2
- score handling HOT 2
- Updating your Books Object
- multiple occurrances of a highlight makes no diff HOT 1
- how to honor the matches in short entries greater than long entries? HOT 5
- which params should I play with? HOT 1
- updating the index in the middle of search HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuzzysearch.