Giter Site home page Giter Site logo

Comments (2)

manishobhatia avatar manishobhatia commented on August 16, 2024

Yes, this scenario is supported through configuration, and follows a similar pattern described in NGram token match

The basic idea is to break the elements into subset of strings (grams) and match them. So in the example you gave the 2 strings will be broken down in this fashion (assuming tri-gram subsets)

STP375S-B60/Wnh_1500V_20V02_1756 -> ['STP', 'TP3', 'P37', '375', '75S', ...., 'Wnh', 'nh_', 'h_1' ..... '756']
STP 375S-B60/Wnh                 -> ['STP', 'TP3', 'P37', '375', '75S', ...., 'Wnh']

So when calculating the results the matching grams will shore up the score for strings having similar substring.
You will most likely never have a 100% match, but you can setup a lower threshold which works for your use case.

Here are the configurable items I would recommend to experiment with

  • Use Tokenizer function: Each Element object allows you to override it with pre-defined functions. There are triGramTokenizer and decaGramTokenizer that you can experiment with
  • You can also define a custom one (see unit test as example) and pass in a function that creates a different gram length
  • And change default threshold for Element match if needed

Once you have a good general solution for matching product names using either of this configuration, or any additional code, will be happy to include this as a new element type. Feel free to open a PR to get this going

Hope this help

Thanks

from fuzzy-matcher.

manishobhatia avatar manishobhatia commented on August 16, 2024

Closing this issue, Feel free to open one if additional support it needed

from fuzzy-matcher.

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.