Dealing with international addresses is no simple task. An address can often be misspelled, incorrectly formatted or simply written in a foreign language that you do not understand. The simple fact that many international addresses are foreign to us means that we are unable to recognize when something is wrong.
Take the simple word “street” for example. It is one of many commonly used words in an address. The French word for street is “rue”, in German it’s “Straße”, in Portuguese it’s “rua”, and it’s the character “路” pronounced “lu” in Chinese and so on. That’s not to mention common abbreviations either. In many cases a person will have a hard time identifying the name of a city or a street in an address and they would be unable to distinguish one from the other.
Let’s take a look at a few international examples:
China (中国)
Address:
Shanghai DPF Textile Co., Ltd.
200331
上海市普陀区武威路259号
98 -A3
Unless you are able to read Chinese you would be hard pressed to make sense of the above example. The first line is in English but it appears to simply be the name of a business. Business names are not required to validate addresses with the AVI service and it is unlikely that it would prove helpful in the validation process. To the contrary, extraneous information like this is often regarded by most systems as garbage data; however, let’s go ahead and pass the address as is to the AVI service and see how it handles it.
URL Query:
Here is what the query looks like when using the web service test page:
Here is the output in JSON, although the service also supports XML:Examining the output, we see that the AVI service fixed the order in which we entered our input values. This was done not only in the transliterated Romanized spelling of the address but also in the localized Chinese format.
Here are both versions of the address parsed from the JSON response output:
Roman Character Format
Shanghai DPF Textile Co , Ltd
98 – A3
No. 259 Wuwei Lu
Putuo Qu, Shanghai Shi
200331
Local (Chinese) Character Format
200331
上海市普陀区武威路259号
Shanghai DPF Textile Co , Ltd
98 – A3
The AVI service identified the street name, city name, postal code as well as other useful information.
Greece (Ελλάδα)
Address:
114 71 Αθηνα
Ασκληπιου 104
Το ΝΟΣΤΙΜΟ
Unless you can read Greek the above address would be difficult to decipher. Let’s see what the AVI service returns.
URL Query:
Here is what the query looks like when using the web service test page:
JSON Output:
Parsing out both of the address formats from the JSON response we get the following:
Roman Character Format:
To NOSTIMO
Asklepiou 104
114 71 Athens
Local (Greek) Character Format:
114 71 Αθηνα
Ασκληπιου 104
Το ΝΟΣΤΙΜΟ
As it turns out, “To NOSTIMO” or “Το ΝΟΣΤΙΜΟ” (in Greek), is the name of a café that resides at the address. Even though the name of the café is not technically a part of the address nor is it necessary for validation, we see that its inclusion did not impede the AVI service from performing its job.
Germany
Let’s see how well the AVI service handles an address when several lines of extraneous data are included.
Address:
Accemic GmbH & Co. KG
C/O World Express (GmbH)
Gunther Meyer, Phone: +49 (0) 8033 6039790
Franzhuber Str 39
Kiefersfelden
In this example, the address is in English, but there is a mess of extraneous information included. What will the AVI service make of this example?
URL Query:
Here is what the query looks like when using the web service test page:
JSON Output:Parsing out the address from the JSON response we get the following:
Roman Character Format:
Accemic GmbH & Co KG
C/O World Express (GmbH)
Gunther Meyer, Phone: +49 (0) 8033 6039790
Franz-Huber-Str. 39
83088 Kiefersfelden
In the above example, we see that the AVI service was able to ignore the three lines of extraneous information and identify the pertinent address information. From there the service standardized the street name, corrected the locality name and appended the missing postal code.