地址标准化工具
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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for pygeocoding-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1611915316eda3a1c439bd5ca1dd7a4b4b1e7b5e385ae1e7f90a9a78e21ae48a |
|
MD5 | d7c5b33129404a1c2acc18481d0b26f4 |
|
BLAKE2b-256 | 18e544d7febec2feaf2aec02c13b721e298a613b0ca814d2f529b75f825028e3 |