Why is verifyMatch showing fuzzy as false for the street attribute using DynamicDamerauLevenshteinDistance comparator?

Question

I am getting contradicting results for some reason. I am trying to fuzzy match "3rd ave" and "Third ave" using the DynamicDamerauLevenshteinDistance comparator. Still, when I test this rule in the verifyMatches API, it's showing fuzzy as false for the street attribute. Do you have any ideas why?

 "matchGroups": [
        {
            "uri": "configuration/entityTypes/Locations/matchGroups/BaseRule03-test",
            "label": "BaseRule03: Exact(Premise, Street, SubBuildingNumber, City, State, Country, PostalCode, Verification Status)",
            "type": "suspect",
            "scope": "INTERNAL",
            "useOvOnly": "true",
            "rule": {
                "comparatorClasses": {
                    "mapping": [
                        {
                            "attribute": "configuration/entityTypes/Locations/attributes/Street",
                            "class": "com.reltio.match.comparator.DynamicDamerauLevenshteinDistance"
                        }
                    ]
                },
                "ignoreInToken": [
                    "configuration/entityTypes/Locations/attributes/Country"
                ],
                "and": {
                    "exactOrAllNull": [
                        "configuration/entityTypes/Locations/attributes/SubBuildingNumber"
                    ],
                    "fuzzy": [
                        "configuration/entityTypes/Locations/attributes/Street"
                    ],
                    "exact": [
                        "configuration/entityTypes/Locations/attributes/Premise",
                        "configuration/entityTypes/Locations/attributes/City",
                        "configuration/entityTypes/Locations/attributes/StateProvince",
                        "configuration/entityTypes/Locations/attributes/Country",
                        "configuration/entityTypes/Locations/attributes/PostalCode/attributes/PostalCode",
                        "configuration/entityTypes/Locations/attributes/VerificationStatus"
                    ],
                    "equals": [
                        {
                            "values": [
                                "Verified",
                                "Partially Verified"
                            ],
                            "uri": "configuration/entityTypes/Locations/attributes/VerificationStatus"
                        }
                    ]
                }
            },
            "scoreStandalone": 0,
            "scoreIncremental": 0
        }
    ]

 

 

Answer

The DynamicDamerauLevenshteinDistance function permits only a maximum distance of 2 for strings ranging from 6 to 10 characters in length, whereas the criterion '3rd ave' is considered equivalent to 'Third ave,' which is assigned a value of 3. It is possible to modify this behavior by utilizing a parameter within the JSON configuration. Additionally, it is recommended to use 'IN' instead of 'EQUALS' for the VerificationStatus parameter. If the 'EQUALS' operator is employed, the values must be identical—'Verified' will only match with 'Verified.' Conversely, using the 'IN' operator allows a verified profile to match with a partially verified profile, which appears to align with your intended functionality.

 

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.