Giter Site home page Giter Site logo

Comments (2)

manishobhatia avatar manishobhatia commented on July 17, 2024

Hi Hagar,

The output of the service return all matching documents. So if you want to match between a collection of 2 documents, this is the service that is most appropriate

The result matches every record in the source (documents) with the multiple target (matchWith). This is a good test to run locally. And to visualize the result, you can add this print statement at the end

       result.entrySet().forEach(entry -> {
            System.out.println("Key: " + entry.getKey().getKey());
            entry.getValue().forEach(match -> {
                System.out.println("Data: " + match.getData() + " Matched With: " + match.getMatchedWith() + " Score: " + match.getScore().getResult());
            });
        });

So the total score of a document rely on the matching elements. At an Element level there is no key, but all elements of the same ElementType undergo match comparisons.
This comparison depends on how many tokens matched and this is represented by matchingCount
For example when matching these 2 element addresses 123 new st. and 123 new Street the tokens are broken down to each word, and we can see 2 tokens 123 and new match.

But this is going into the internals of match algorithm. For most of the cases just using the key at a Document and the overall score in Match should suffice in finding similarities. If you can elaborate your use case with a few examples, that can help me understand what your are trying to solve.

from fuzzy-matcher.

Hagar-Usama avatar Hagar-Usama commented on July 17, 2024

Hello @manishobhatia,

Thank you for your prompt response.

My current flow is as the test you mentioned. However, I wish to take an extra step due to the business logic requirements.

In addition to displaying the matched rows along with their scores, it is necessary to indicate the degree of similarity for each field compared to the corresponding field in the matched rows.

For instance:


Match:
- Row1: Field 1: value1, Field 2: value2, Field 3: value3
- Row2: Field 1: value4, Field 2: value5, Field 3: value6

Match Score = 60%

Field-wise score:
- Field 1 --> Score (25%)
- Field 2 --> Score (10%)
- Field 3 --> Score (50%)

And thank you for letting me know that the comparison is based on elementType rather than mapping elements. This will definitely help.

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.