Skip to main content

地址标准化工具

Project description

geocoding

介绍

  • 本项目旨在将不规范(或者连续)的文本地址进行尽可能的标准化, 以及对两个地址进行相似度的计算
  • 该模块为 bitlap/geocoding 项目的Python实现,原项目为Kotlin开发
  • 安装命令 pip install GeocodingX

地理编码技术, 主要分为如下步骤

  • 地址标准库
  • 地址标准化
  • 相似度计算

1. 数据测试

方法调用: Geocoding

  • normalizing: 标准化
  • analyze: 解析成分词文档
  • similarity: 相似度计算
  • similarityWithResult: 相似度计算, 返回包含更多丰富的数据

1.1 标准化

>> 输入: 上海上海宝山区宝山区【新沪路58弄11-802  水韵华庭 】 (水韵华庭附近)号大都会3号楼2单元1303
>> 输出:
Address(
	provinceId=310000000000, province=上海, 
	cityId=310100000000, city=上海市, 
	districtId=310113000000, district=宝山区, 
	streetId=None, street=None, 
	townId=None, town=None, 
	villageId=None, village=None, 
	road=新沪路, 
	road_num=58弄, 
	building_num=11-802, 
	text=水韵华庭水韵华庭附近
)
  • 返回的对象解释
    • province相关: 省
    • city相关: 市
    • district相关: 区、县
    • street相关: 街道
    • town相关: 乡镇
    • village相关: 村
    • road: 道路
    • roadNum: 路号
    • buildingNum: 建筑物号
    • text: 标准化后为匹配的地址。一般包含小区, 商场名称等信息

注: 如果对text的结果不是很满意, 比如出现重复或不准确, 可以通过分词的手段解决

>> 输入:
  浙江金华义乌市南陈小区8幢2号
  浙江金华义乌市稠城街道浙江省义乌市宾王路99号后面南陈小区8栋2号
>> 输出: 
  0.6795216660765248
>> 输入:
  山东省沂水县四十里堡镇东艾家庄村206号
  浙江金华义乌市南陈小区8幢2号
>> 输出:
  0.0

感谢

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygeocoding-1.1.2.tar.gz (6.7 MB view details)

Uploaded Source

Built Distribution

pygeocoding-1.1.2-py3-none-any.whl (6.7 MB view details)

Uploaded Python 3

File details

Details for the file pygeocoding-1.1.2.tar.gz.

File metadata

  • Download URL: pygeocoding-1.1.2.tar.gz
  • Upload date:
  • Size: 6.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.16

File hashes

Hashes for pygeocoding-1.1.2.tar.gz
Algorithm Hash digest
SHA256 c7b37056c1e2d8a279ecc09ea5c4a2949a16562e5547d46093051724a81ddeac
MD5 701b3b8ec5b0746b897b3fae65484920
BLAKE2b-256 2a6d7f19f5f22118d73a882cad985ce465001a2e6cda648b8e8a20ecf2e4a543

See more details on using hashes here.

File details

Details for the file pygeocoding-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: pygeocoding-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.16

File hashes

Hashes for pygeocoding-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1611915316eda3a1c439bd5ca1dd7a4b4b1e7b5e385ae1e7f90a9a78e21ae48a
MD5 d7c5b33129404a1c2acc18481d0b26f4
BLAKE2b-256 18e544d7febec2feaf2aec02c13b721e298a613b0ca814d2f529b75f825028e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page