How do you deal with duplicate street suffixes?

2019-08-01 21:01发布

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"?

6条回答
Explosion°爆炸
2楼-- · 2019-08-01 21:15

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

查看更多
Fickle 薄情
3楼-- · 2019-08-01 21:16

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.

查看更多
欢心
4楼-- · 2019-08-01 21:28

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

查看更多
Melony?
5楼-- · 2019-08-01 21:28

The trouble with trying to expand/contract addresses yourself is that oftentimes abbreviations can be part of the street or even city name. For example: "100 Avenue A" where Avenue isn't supposed to be abbreviated. Or "900 St Louis Loop". In this case St don't mean street, it means Saint.

Within the USA, there is a component of a certificated address called a delivery point barcode (DPBC). It's a unique 12-digit value that can serve as the unique identifier of an address. To get this value you'll want to use an address verification or address standardization web service API, which can cost about $20/mo depending upon the volume of requests you make to it. Using this you can easily prevent duplicates or do fraud prevention/detection, etc.

In the interest of full disclosure, I'm the founder of SmartyStreets. We offer just such an address verification web service API called LiveAddress. You're more than welcome to contact me personally with any questions you have.

查看更多
甜甜的少女心
6楼-- · 2019-08-01 21:32

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

查看更多
甜甜的少女心
7楼-- · 2019-08-01 21:33

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.

查看更多
登录 后发表回答