1

I write c# code that gets as an input string an Israeli address plus additional data. I want to match only the address.

i.e. "CompanyA 02-4673889 myStreet 8, myCity"

"Best X-store myStreet 877 indestirial area myCity"

I thought that my c# could search for a city from a 70 cities list I have and then match for a street name.

1)Does someone know where can I find streets list for isaeli cities?

2) Can someone think of a better way of fetching the data from the string?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
  • perhaps if you provide how you have that data you could load it into a container or save is as xml or on a database where you could easyly make search thru it ? – Prix Sep 30 '11 at 22:33
  • "address plus additional data". What is the additional data? Phone numbers, post address, pet names? I would think it will be hard to deduct the street address since these tend to come in many forms with and without numbers etc, but maybe you could flip the logic and remove everything that is *not* a street address? – Avada Kedavra Sep 30 '11 at 22:36
  • given the examples in your update i think this will be painful. If you had a separator different from space in between the fields it would be easy(-ier). Where does the data come from? Any possibilities to change the input format of each string? – Avada Kedavra Sep 30 '11 at 22:48
  • I harvest it from other sites. I asked them for API, but got no reply. Any creative isea for me? – Elad Benda Oct 01 '11 at 22:16
  • @EladBenda Can you please mention how did you manage to get that list of cities. I'm on the same work right now, For Israel specifically as well. – Jacob May 15 '17 at 23:03

1 Answers1

1

The only way to truly and accurately parse address data is by using an online address validation service. The problem with addresses, and especially international addresses, is that there is no real standard. The other problem is that addresses are not "self validating" which means you can't tell if an address is good or even formatted properly by just looking at it. There are a few services out there that do address verification, and I believe there are a few that handle Israeli addresses.

Among those providers there are two basic ways to get your addresses cleaned. You can use their "batch scrubbing" capabilities where you upload a file and receive it back within a few minutes (or days), depending upon the provider. Or you could hook into their address verification web service API each time you receive an address. The correct answer depends upon your business needs and how immediate you need a response.

Most web service APIs will return the various component parts of an address--including street name--which allows you to perform your desired business function.

I should mention that I'm the founder of SmartyStreets. We do address verification for addresses in the United States. I realize you're trying to do Israeli addresses, but the domain knowledge I'm sharing here on the topic is generally universal in nature.

Jonathan Oliver
  • 5,207
  • 32
  • 31