Java邮政地址解析器 [英] Java postal address parser

查看:138
本文介绍了Java邮政地址解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题有点相关,但由于没有任何关于QuickBooks的答案,有没有人知道Java的地址解析器?可以采取非结构化地址信息并解析地址行1,2和城市州邮政编码和国家/地区的东西?

Somewhat related to this question, but in the absence of any answer about QuickBooks specifically, does anyone know of an address parser for Java? Something that can take unstructured address information and parse out the address line 1, 2 and city state postal code and country?

推荐答案

我确实知道谷歌地图网络服务很棒这样做。因此,如果你想使用它,你可以节省很多精力。

I do know that the Google Maps web service is great at doing this. So, if you want to use that, you could save a lot of effort.

这里真正的问题是你需要一个城市/国家/地区名称的全球数据库有效地解析UNSTRUCTURED地址。

The real issue here is that you need a worldwide database of city/country/province names to effectively parse UNSTRUCTURED addresses.

以下是我在C#中构建供Google Maps API使用的网址的方式:

Here is how I build a URL for use by the Google Maps API in C#:

string url = "http://maps.google.com/maps/geo?key=" + HttpUtility.UrlEncode(this.apiKey) + "&sensor=false&output=xml&oe=utf8&q=" + HttpUtility.UrlEncode(location);

这篇关于Java邮政地址解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆