Problem
- Two profiles have the same name, but one source writes it with a letter such as ü or ö and another with ue or oe, for example "Anna Müller" and "Anna Mueller".
_verifyMatchesshows that the rule's other conditions match, but the name attribute, compared withDistinctWordsComparator, showsmatch: false.- The pair is matched by another rule instead, for example a potential match rule, or isn't matched at all.
Cause
DistinctWordsComparator splits each value into words with the regular expression in its pattern parameter, \w+ by default. It matches when the shared words reach its threshold, 50% of the words by default. In \w+, a word is made only of the letters A–Z and a–z, digits, and underscore, so a letter such as ü or ö splits the word in two. "anna müller" becomes {anna, m, ller}, compared with {anna, mueller}, so only 1 of 3 words is shared.
The comparator's own transliterate option doesn't help here, because the comparator splits the value into words before it transliterates.
Diagnose
- Check the rule configuration: the name attribute is mapped to
com.reltio.match.comparator.DistinctWordsComparatorwith nopatternparameter. - Check the
_verifyMatchesresponse for the pair: the match document of one profile has the accented letter and the other has the ASCII spelling.
Solution
Add a
TransliterateCleanserfor the name attribute to the rule'scleansesection, inside the rule'sandblock as in the documentation example. Use an ICU transliteration command that converts accented letters the way your sources spell them, for examplede-ASCIIfor German names (ü to ue, ö to oe). The cleanser runs before the match tokens are built and before the comparator splits the value, so "Müller" and "Mueller" become the same word."cleanse": [ { "cleanseAdapter": "com.reltio.cleanse.impl.TransliterateCleanser", "cleanseAdapterParams": { "transliteratorCommand": "de-ASCII" }, "mappings": [ { "attribute": "configuration/entityTypes/HCP/attributes/Name", "cleanseAttribute": "configuration/entityTypes/HCP/attributes/Name" } ] } ]- Before you save the rule, test it: send a copy of the changed rule in the
matchGroupsbody of_verifyMatchesfor the pair, and for a few pairs that must not match. The request doesn't change the tenant. The cleanser's results are visible to other match rules too, so check the entity type's other rules in the same response. - Save the rule and run the Rebuild Match Table task for the entity type.
Verify
_verifyMatches for the pair, without custom match groups, shows match: true for the name attribute, and the expected rule matches the pair.
Comments
Article is closed for comments.