[Talk-ca] Preferred phone number format

OSM Volunteer stevea steveaOSM at softworkers.com
Thu Feb 1 04:09:22 UTC 2018


> 	• There are additionally ~45 phone numbers that use letters instead of digits (eg 1-555-GOT-BEER)
> 	• ";" separator is used occasionally to indicate multiple phone numbers.  " ", "," and "/" are also used.
> 	• There are random comments in the phone number field (not sure where these really should be?)
> 	• Extensions are represented generally by "x" or "ext" or "ext."
> 	• There are less than 1000 phone numbers using contact:phone instead of phone, using ~40 unique formats
> 	• I did not analyze phone_1 or fax or any other tags.
> I will continue to cleanup phone numbers across the country which are missing the leading +1 and or are not one of the 4 common formats listed above.  My thought is that 
> 	• I will leave the phone numbers of 1-555-GOT-BEER type.  
> 	• I will use ";" as multiple number separator.  
> 	• I will use "x" for extension. 
> 	• And I will be happy to cleanup the wonky ones with lots of text in them if there is a direction of where this should move to.  Example for a radio station: "office (###) ###-####; on-air studio (###) ###-####"
> 
> Feedback welcome.

Those sound largely sane and well thought out to me.  (And I wrote phone number parsers for the NANP about 30 years ago, um — wait for it — in HyperTalk!)  The GOT-BEER style are best left alone (imo) as smarter parsers eventually figure those out.  Yes, ; (semicolon) is a frequent separator in key:value pair value lists in OSM data.  Yes, x (choose a case, lower seems better and more common than upper) for extensions.  For the radio station/on-air studio stuff I'd make the first part of each of these "compound data" be the phone number in one of the acceptable formats along with other data, then have extra descriptive text added to the rest, even if in a semicolon-separated list.  That's a pretty regular set of alphanumerics and with maybe a eight or ten rules, (reasonable for a parser extracting machine-dialble phone numbers, if necessary), you're either done or at or above 99%, I'd be willing to wager (and I'm not a betting type, though I do play poker with friends and online).

Nice job.

SteveA


More information about the Talk-ca mailing list