gpt4 book ai didi

c# - 将地址与地址列表进行比较

转载 作者:行者123 更新时间:2023-11-30 17:04:48 26 4
gpt4 key购买 nike

根据我们的 SQL 数据库地址列表检查客户地址,以判断该地址是否存在于我们的数据库中。客户地址采用不同的格式。

e.g:- 8455 W 23RD st OFFICE 4
8455 WEST 23RD st OFC 4
8455 WEST TWENTY-THIRD street OFC 4

如果我进行字符串比较,我将得到 bExist = False;

注意:- 我正在使用 C#,应用程序运行的服务器没有互联网连接。附加例如:-

APARTMENT   APT
APARTMENT APARTMENT
BUILDING BLDG
BUILDING BUILDING
DEPARTMENT DEPT
DEPARTMENT DEPARTMENT
FLOOR FL
FLOOR FLOOR
HANGAR HNGR
HANGAR HANGAR
LOT LOT
OFFICE OFC
OFFICE OFFICE
PIER PIER
PIER PIER
ROOM RM
ROOM ROOM
SLIP SLIP
SPACE SPC
SPACE SPACE
STOP STOP
SUITE STE
SUITE SUITE
TRAILER TRLR
TRAILER TRAILER
UNIT UNIT

N NORTH
S SOUTH
E EAST
W WEST
NE NORTHEAST
SE SOUTHEAST
NW NORTHWEST
SW SOUTHWEST
NORTH NORTH
SOUTH SOUTH
EAST EAST
WEST WEST
NORTHEAST NORTHEAST
SOUTHEAST SOUTHEAST
NORTHWEST NORTHWEST
SOUTHWEST SOUTHWEST
NORTH EAST NORTHEAST
SOUTH EAST SOUTHEAST
NORTH WEST NORTHWEST
SOUTH WEST SOUTHWEST

最佳答案

有很多选项,如果你有 SSIS,你可以使用它们内置的模糊匹配,这已经足够了。

我使用了 Ambient Concepts 的工具:Address Parser它是一组函数,可以解析和标准化您的地址。他们似乎提供免费试用,因此您可以进行测试。

您也可以从头开始,尽可能地使数据同质化。我们经常将街道号码和街道名称分开,因为绝大多数差异来自前/后方向,即:12 north 5th st、12 n 5th st、12 5th st north 等。以及数字与数字单词.

关于c# - 将地址与地址列表进行比较,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17097855/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com