我如何解析自由格式的地址保存到数据库中 [英] How do I parse the free format address to save into the DataBase

查看:93
本文介绍了我如何解析自由格式的地址保存到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本区域,允许用户自由格式的地址,我该如何解析地址,用户输入到地址1,地址,城市,州,邮编和国家,并保存到数据库的类型?

I have a text area that allow user the type in an address in free format, how do I parse the address user entered into address1, address2, city, state, zip and country and save into DB?

推荐答案

您是在很多痛苦这里。

地址实在太差了国家之间的差异,甚至在同一国家内的解析很容易出错。在那里,领导一个团队的2人花费数月时间试图让所有的德国地址解析。愚蠢的小很多专业左右。

Addresses REALLY BADLY differ between countries, and even within one country parsing is error prone. Been there, leading a team of 2 people spending months trying to get all GERMAN addresses to parse. Lots of stupid little specialties left and right.

噩耗 - 我不认为能够可靠地完成。不OIF该条目是免费的形式,而不是与人以各种方式输入地址的方式。

Sad news - I dont think that can be done reliably. Not oif the entry is free form, not with the way people enter addresses in various ways.

去一个体面的报名表,不提供免费文本输入。

Go with a decent entry form, not with free text entry.

这篇关于我如何解析自由格式的地址保存到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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