intuit / fuzzy-matcher

A Java library to determine probability of objects being similar.
Apache License 2.0
226 stars 69 forks source link

Information on Library usage #70

Closed ranjith-shady closed 1 year ago

ranjith-shady commented 1 year ago

Hi, Can i use this library for matching payment and invoice records. let's say on payment side i have 5-6 properties { invoice-number, invoice-amount, customer-name, invoice-date, customer-email} Note : These properties are extracted for payments through the advice document we receive. Same properties will be available for invoice as well { invoice-number, invoice-amount, customer-name, invoice-date, customer-email}

Can i use this library to find which invoice is the most suitable match for the payment

For example - let's consider there is a payment and 6invoices

Will i be able to score all the invoices against a payment

payment 1 - invoice 1 - score is 0.9 payment 1 - invoice 2 - score is 0.8 payment 1 - invoice 3 - score is 0.7 payment 1 - invoice 4 - score is 0.6 payment 1 - invoice 5 - score is 0.65 payment 1 - invoice 6 - score is 0.77

manishobhatia commented 1 year ago

Hi Ranjith, Yes, fuzzy-matcher is ideal for this type of matching records. Each of the properties can be configured as an Element with its relevant type and you should be able to get scores between the 2 records.

Here are some suggested Element type for each property you mentioned

Hope this helps

manishobhatia commented 1 year ago

Regarding matching each payment with all the available invoices, that should be possible too. See "Match a Document with Existing List" option in Match Service as your calling service, where document is pointing to Payment and matchWith is pointing to the list of invoices you have.

By default it will only give results if the match is above 0.5

ranjith-shady commented 1 year ago

Great. Can i also use multiple payments instead of single payment so performace can be improved. where i expect each payment to be compared with list of all the invoices and give the match score. Also can i increase the priority for some of the properties say invoice number and amount compared to others.

manishobhatia commented 1 year ago

Using multiple payments is also possible. Use this API for sending in a list of payments to be matched with another list of invoices This should be more performant than the previous API

Increasing a priority of some properties is also possible. See Weight in the Element Configuration to achieve this

ranjith-shady commented 1 year ago

Thank you for the update. let me try the library and get back if there are any questions.