-
Timur Kristóf authored
This commit yields a significant improvement to how our phone number matching works. It gets rid of a lot of false positive matches. Previously we used a "minimized" number which we stored in the cache and used for matching. This lead to false positives between numbers for which the "minimized" number was the same when the full wasn't, for example when the area code of the number differs in only one digit. Examples of solved false positive matches: "+36 20 123 4567" and "+36 30 123 4567" were matched incorrectly. "+36 20 123 4567" and "+44 20 123 4567" were matched incorrectly. The new approach is to cache the full phone number and perform the matching between the full numbers using libphonenumber, which has a quite resilient algorithm for this. Local numbers and international direct dial (IDD) are still matched: Examples of local and IDD numbers that still work: "+36 20 123 4567" still matches "06 20 123 4567" (local) "+36 20 123 4567" still matches "00 36 70 381 0581" (IID) Limitations: We currently do NOT pass a default region code to libphonenumber, which means that some false positives can still occour in edge cases when a country code would be required to distinguish between the two numbers. This only happens when some numbers are supplied in a non-international format. Examples of remaining false positives: "06 20 123 4567" is a false positive match of "+1 0620 123 4567" "00 36 20 123 4567" is a false positive match of "+1 00 36 20 123 4567" We deem that the remaining false positives are unlikely enough that they don't matter in practice. If this becomes relevant, we will need to make it possible to pass a region code to the matching algorithm.
cdb00054
Name |
Last commit
|
Last update |
---|---|---|
rpm | ||
src | ||
tests | ||
translations | ||
README | ||
config.pri | ||
libcontacts.pro | ||
package.pri |