Re: [Talk-ca] Preferred phone number format

2018-02-12 Thread Matthew Darwin
Phone number tidy-up is now complete, per the original discussion.  I 
think we still could clean up this list further I welcome any 
discussion in that regard.  Any phone numbers using letters instead of 
numbers remain with letters.


The top 10 formats used in Canada are:

  20640 phone"+#-###-###-
   4457 phone"+# ###-###-
   3749 phone"+# ### ### 
   2630 phone"+# ### ###-
   1293 fax"+#-###-###-
    940 contact:phone"+#-###-###-
    158 contact:fax"+#-###-###-
    118 phone:tollfree"+#-###-###-
    110 phone"###-
 40 phone"+#-###-###-;+#-###-###-

On 2018-02-07 06:46 PM, Matthew Darwin wrote:


A further update on this work:

  * I found more yet bizarre phone-related tags "phone:1",
"telephone" and the like.  These have all been tidied.  My
osmfilter now looks like this:    --keep="contact:*=* or
phone*=* or Phone*=* or alt_phone=* or fax*=* or tty*=*"
Additional suggestions for something to search on are welcome so
I get all phone numbers.
  * I found there were some formats used very regionally eg. 
Edmonton Schools used one format consistently and Ottawa Schools
used a different format consistently.
  * The canada.poly filter I have been using includes Saint Pierre
and Miquelon (which does not use North American dialing plan),
as well as a few US entries (especially relations which go near
the border). If anyone knows of a canada.poly that is tighter,
can you point me in the direction?  I am generally leaving
non-Canadian entries alone, but they do count in the stats below.
  * There are now 67 unique tag/phone number format combinations
(down from 400+ originally) when using   egrep -i
'k="[a-z:]*(phone|fax|tty)[a-z:]*" ' $OSMFILENAME | cut -d\"
-f2,4 | sed -e 's/[0-9]/#/g' | sed -e 's/[A-Z]/A/g' | sed -e
's/([a-zA-Z -]*)/(...)/g' | sort | uniq -c | sort -nr | wc -l
  * The bulk of the work remaining now is to reformat the big groups
of numbers that do not begin with "+1". I will make changes by
area code to limit the number of canada-wide changesets.


As always, comments welcome.

Here is the new "top 20"as of ~10am ET today:

  12555 phone"+#-###-###-
   4453 phone"+# ###-###-
   4060 phone"###-###-
   3749 phone"+# ### ### 
   2624 phone"+# ### ###-
   2239 phone"(###) ###-
   1292 fax"+#-###-###-
   1032 phone"##
    941 contact:phone"+#-###-###-
    323 phone"+###
    322 phone"+# ### ###
    158 contact:fax"+#-###-###-
    117 phone:tollfree"+#-###-###-
    109 phone"###-
 39 phone"+#-###-###-;+#-###-###-
 25 phone"+#-###-###-
 23 phone"+#-###-###-x###
 17 phone"+# (###) ###-
 14 phone"+#-###-###-x
  9 phone"+#-###-###-x#


___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-02-07 Thread Matthew Darwin

A further update on this work:

 * I found more yet bizarre phone-related tags "phone:1", "telephone"
   and the like.  These have all been tidied.  My osmfilter now looks
   like this:    --keep="contact:*=* or phone*=* or Phone*=* or
   alt_phone=* or fax*=* or tty*=*"  Additional suggestions for
   something to search on are welcome so I get all phone numbers.
 * I found there were some formats used very regionally eg. Edmonton
   Schools used one format consistently and Ottawa Schools used a
   different format consistently.
 * The canada.poly filter I have been using includes Saint Pierre and
   Miquelon (which does not use North American dialing plan), as well
   as a few US entries (especially relations which go near the
   border). If anyone knows of a canada.poly that is tighter, can you
   point me in the direction?  I am generally leaving non-Canadian
   entries alone, but they do count in the stats below.
 * There are now 67 unique tag/phone number format combinations (down
   from 400+ originally) when using   egrep -i
   'k="[a-z:]*(phone|fax|tty)[a-z:]*" ' $OSMFILENAME | cut -d\" -f2,4
   | sed -e 's/[0-9]/#/g' | sed -e 's/[A-Z]/A/g' | sed -e 's/([a-zA-Z
   -]*)/(...)/g' | sort | uniq -c | sort -nr | wc -l
 * The bulk of the work remaining now is to reformat the big groups
   of numbers that do not begin with "+1".  I will make changes by
   area code to limit the number of canada-wide changesets.


As always, comments welcome.

Here is the new "top 20"as of ~10am ET today:

  12555 phone"+#-###-###-
   4453 phone"+# ###-###-
   4060 phone"###-###-
   3749 phone"+# ### ### 
   2624 phone"+# ### ###-
   2239 phone"(###) ###-
   1292 fax"+#-###-###-
   1032 phone"##
    941 contact:phone"+#-###-###-
    323 phone"+###
    322 phone"+# ### ###
    158 contact:fax"+#-###-###-
    117 phone:tollfree"+#-###-###-
    109 phone"###-
 39 phone"+#-###-###-;+#-###-###-
 25 phone"+#-###-###-
 23 phone"+#-###-###-x###
 17 phone"+# (###) ###-
 14 phone"+#-###-###-x
  9 phone"+#-###-###-x#



On 2018-02-04 11:49 PM, OSM Volunteer stevea wrote:

On Feb 4, 2018, at 8:37 PM, Matthew Darwin  wrote:

Just an update on this activity.

Again, nice work!


Here are the top 20 tags as of ~4pm ET Sunday:

   10669 phone"+#-###-###-
4392 phone"+# ###-###-
4206 phone"###-###-
2970 phone"+# ### ### 
2540 phone"+# ### ###-
2451 phone"(###) ###-
1076 phone"##
 659 phone"+# ### ###
 547 fax"+#-###-###-
 522 contact:phone"+#-###-###-
 516 phone"+###
 456 phone"#-###-###-
 446 phone"### ### 
 378 fax"+# ###-###-
 283 contact:phone"### ###-
 260 phone"+# (###) ###-
 200 fax"+###
 186 phone"### ###-
 170 phone"(###)###-
 162 fax"+# ### ###-

I'd appreciate others to chime in about this, but it seems where dashes and space 
characters overlap (are the only difference in format), those can be conflated together.  
I'm not sure whether dash or space ends up as "the winner," but this should 
reduce the number of categories.

As you consider additional conflations, you may be able to do this again and 
again, getting it down to a fairly small number of formats.  I urge additional 
feedback (here would be good) before additional conflations, but (I keep saying 
it):  nice work.

SteveA


___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-02-06 Thread Stewart C. Russell
On 2018-02-05 05:17 PM, Matthew Darwin wrote:
> 
> use the letters instead of numbers "+1-555-GOT-BEER"

I'd suggest mapping these to the numbers BUT international phone pads
have a superset of what we use here (7 has Q and 9 has Z) and older
phones may not be consistent with what we assume now. In the UK, ABC
used to be on 2.

cheers,
 Stewart

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-02-06 Thread Stewart C. Russell
On 2018-02-05 04:44 PM, Matthew Darwin wrote:
> I don't know why people use phone=* vs contact:phone=*

Because it's the default in most editors, and it's shorter. I'd prefer
it over contact:phone, because that's a needless namespace. Also, this:
https://wiki.openstreetmap.org/wiki/Talk:Key:contact#Deprecate_this_tag_family

 Stewart

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-01-31 Thread OSM Volunteer stevea
>   • 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
___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-01-31 Thread Matthew Darwin

Hi all,

So we get a sense of what phone number formats people are using, I 
pulled all the *phone* and *contact:phone *tags from OSM in Canada.  
The top 10 formats used are:


   8819 phone"+#-###-###-
   4321 phone"###-###-
   4298 phone"+# ###-###-
   3012 phone"+# ### ### 
   2558 phone"+# ### ###-
   2471 phone"(###) ###-
   1087 phone"##
    946 phone"+#-
    680 phone"+# ### ###
    512 phone"+###

So one of the recommended formats is the top one in use.  But there 
are 4 formats in high use which have the leading "+1", but have 
different variants of spaces/hyphens:


   8819 phone"+#-###-###-
   4298 phone"+# ###-###-
   3012 phone"+# ### ### 
   2558 phone"+# ### ###-

Other facts:

 * There are ~400 unique formats (when changing all digits to #) of
   phone and contact:phone
 * 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.



On 2018-01-28 08:22 PM, Matthew Darwin wrote:

Hi all,

Is there a preferred phone number format we use in Canada?

I noticed a bunch of phone numbers in Ottawa don't follow the 
recommendations in https://wiki.openstreetmap.org/wiki/Key:phone, 
namely:


  * phone=/number/ where the /number/ should be in international
(ITU-T E.164 ) format
  o phone=+  , following
the ITU-T E.123  and the
DIN 5008  pattern
  o (phone=+--, following
the RFC 3966/NANP  pattern)

Is there a preference which of these formats is used?   Can anyone 
run a query and see which is more popular in the country?


The reason I'm asking is that since a bunch of phone numbers leave 
off the +1 (and have other errors), I want to align them to the 
recommended format.   I am wondering if I should have them in the 
format of "+1 999 555 1234" or "+1-999-555-1234". If there is no 
existing preference adopted in OSM Canada, I will use the latter to 
cleanup the non-compliant phone numbers.


Comments?

I am also assuming we prefer "phone" over "contact:phone" as per 
https://wiki.openstreetmap.org/wiki/Key:contact




___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-01-28 Thread Matthew Darwin

Just FYI, I am not doing an automated edit.  One at a time in JOSM.

On 2018-01-28 10:23 PM, Stewart C. Russell wrote:

On 2018-01-28 08:22 PM, Matthew Darwin wrote:

I am wondering if I should have them in the format of "+1 999
555 1234" or "+1-999-555-1234".    If there is no existing preference
adopted in OSM Canada, I will use the latter to cleanup the
non-compliant phone numbers.

Comments?

Please use the ITU standard: it's international, and so are we. You
never know what country an OSM user will be coming from.

The great advantage to having the +1 in a number is that Canadian cell
phones won't give you the stupid "This is a long distance call …" spiel
if you include it.

Thanks for looking at this - but as with any automated edit, please take
care.

  Stewart

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-01-28 Thread Stewart C. Russell
On 2018-01-28 08:22 PM, Matthew Darwin wrote:
> I am wondering if I should have them in the format of "+1 999
> 555 1234" or "+1-999-555-1234".    If there is no existing preference
> adopted in OSM Canada, I will use the latter to cleanup the
> non-compliant phone numbers.
> 
> Comments?

Please use the ITU standard: it's international, and so are we. You
never know what country an OSM user will be coming from.

The great advantage to having the +1 in a number is that Canadian cell
phones won't give you the stupid "This is a long distance call …" spiel
if you include it.

Thanks for looking at this - but as with any automated edit, please take
care.

 Stewart

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Preferred phone number format

2018-01-28 Thread James
personally I prefer:

RFC 3966/NANP  pattern

as its more commonly used for telephone numbers(less the country
code(unless long distance). Especially in white pages(back in the day we
had paper copies)

On Jan 28, 2018 8:24 PM, "Matthew Darwin"  wrote:

> Hi all,
>
> Is there a preferred phone number format we use in Canada?
>
> I noticed a bunch of phone numbers in Ottawa don't follow the
> recommendations in https://wiki.openstreetmap.org/wiki/Key:phone, namely:
>
>- phone=*number* where the *number* should be in international (ITU-T
>E.164 ) format
>   - phone=+  , following the ITU-T
>   E.123  and the DIN 5008
>    pattern
>   - (phone=+--, following the
>   RFC 3966/NANP  pattern)
>
> Is there a preference which of these formats is used?   Can anyone run a
> query and see which is more popular in the country?
>
> The reason I'm asking is that since a bunch of phone numbers leave off the
> +1 (and have other errors), I want to align them to the recommended
> format.   I am wondering if I should have them in the format of "+1 999 555
> 1234" or "+1-999-555-1234".If there is no existing preference adopted
> in OSM Canada, I will use the latter to cleanup the non-compliant phone
> numbers.
>
> Comments?
>
> I am also assuming we prefer "phone" over "contact:phone" as per
> https://wiki.openstreetmap.org/wiki/Key:contact
>
> ___
> Talk-ca mailing list
> Talk-ca@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-ca
>
>
___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca


[Talk-ca] Preferred phone number format

2018-01-28 Thread Matthew Darwin

Hi all,

Is there a preferred phone number format we use in Canada?

I noticed a bunch of phone numbers in Ottawa don't follow the 
recommendations in https://wiki.openstreetmap.org/wiki/Key:phone, namely:


 * phone=/number/ where the /number/ should be in international
   (ITU-T E.164 ) format
 o phone=+  , following
   the ITU-T E.123  and the
   DIN 5008  pattern
 o (phone=+--, following
   the RFC 3966/NANP  pattern)

Is there a preference which of these formats is used?   Can anyone run 
a query and see which is more popular in the country?


The reason I'm asking is that since a bunch of phone numbers leave off 
the +1 (and have other errors), I want to align them to the 
recommended format.   I am wondering if I should have them in the 
format of "+1 999 555 1234" or "+1-999-555-1234".    If there is no 
existing preference adopted in OSM Canada, I will use the latter to 
cleanup the non-compliant phone numbers.


Comments?

I am also assuming we prefer "phone" over "contact:phone" as per 
https://wiki.openstreetmap.org/wiki/Key:contact


___
Talk-ca mailing list
Talk-ca@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk-ca