views:

249

answers:

5

I have a system where users need to enter addresses. I am trying to limit duplicates of course and something I started noticing was becoming a big problem was some users putting in "Road" and others "Rd", therefore duplicates were creeping in.

I looked up the list of USPS street suffix abbreviations but I still have a question which I can't find an answer to. Can I replace all words in a street address with the USPS standard abbreviation? An example would be "123 Forest Hill Road". If I were to replace it with the abbreviations it would then be "123 Frst Hl Rd" or does the "street suffix" that USPS is referring to mean they only want you to make go as far as "123 Forest Hill Rd"?

+2  A: 

You would have to ask the USPS to be sure, but I imagine that your app and data would be in trouble if you started replacing "123 Forest Hill Rd" with "123 Frst Hl Rd".

I have done some work with addresses and let me tell you it is very complicated and time consuming to do even remotely correctly. In most cases you would be better off making use of existing packages out there. For example, you would be surprised what you can achieve with a few simple calls to the free Google Maps API.

cbp
A: 

Can you avoid the whole problem by expanding all of the terms rather than attempting to abbreviate any?

sweeney
A: 

On the duplicates, just wondering if you'd be better to make the Users choose from a drop-down of Address Types. Take it out of the User's hands.

On the abbreviation, are you asking this because USPS needs the Address in some specific format? Just wondering what purpose there is in the abbreviating. Apologies if I've missed the mark.

Stu Andrews
+4  A: 

USPS has an API that can get you properly formatted addresses.

cowgod
A: 

You could also take a look at the USPS Postal Addressing Standards which has explanation of the preferred and acceptable formats for various address examples.

http://pe.usps.gov/text/pub28/pub28c2_toc.htm

In the example case, the relevant section is 23 Delivery Address Line.

http://pe.usps.gov/text/pub28/pub28c2_012.htm

moberley