4 ms·
This is great until you realize the average address book is a disgusting mess of spelling errors, wrong values in wrong fields, punctuation in places where punc
by MagicWishMonkey 13y ago
This is great until you realize the average address book is a disgusting mess of spelling errors, wrong values in wrong fields, punctuation in places where punctuation isn't necessary (commas in phone number fields, digits in name fields, etc.)
The only field that might be fairly consistent is email address and even that is no guarantee. Sure, it's possible to clean up a contact before hashing, but when you consider the fact that the typical phone contains >500 contacts it's not something that can be done in a reasonable amount of time on a modern smartphone. For the last two years I've been working on a product that involves cleaning/organizing contacts and making them searchable, when I started I had no idea what a massive undertaking it would be.
So, hash till your hearts content, but if you have 10 different people with the same contact in their address book I would be willing to bet that you will get 10 different hashes because humans are not good at data entry.
- jokull 13y agoWhere can I find your app?
- MagicWishMonkey 13y agoIt's not public yet (focused on the enterprise space right now), I'll send you a pm to our website. edit not sure how to do a pm here, if you use reddit send me a private message user/MagicWishMonkey
- ww520 13y agoThere similarity hash algorithms that takes a fuzzy approach to hashing slightly different values to the same hash value.
- MagicWishMonkey 13y agoThe SHA256 algorithm described in the article is not a fuzzy algorithm.
- danielrhodes 13y agoThis times a million. Phone numbers in particular can be a horrid mess to deal with. Some decent libraries have come out to normalize them, but in general it remains difficult. For example: 013811234 +88-1-3811234 3811234 0118813811234 008813811234 are all be the same number. To hash them, you could naively just strip off the area codes and country codes, but that is only if you can know ahead of time they are indeed area or country codes. Some countries have 7 digit numbers, others have 9, some have 6, or even 5 digits. Sometimes you don't even know the country to apply these rules to.
- svasan 13y agoJust a thought - Why not reverse the phone number string and if there is a match in the first N digits of all the above phone numbers, then classify these as the same phone number? N would vary from country to country, no doubt. The intermediate characters like {,, +, -, .,} could also be stripped out from the phone number string to make the original problem less complex.