All Projects → IceMimosa → geocoding

IceMimosa / geocoding

Licence: MIT license
地理编码技术,提供地址标准化和相似度计算。

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to geocoding

python-censusbatchgeocoder
A simple Python wrapper for U.S. Census Geocoding Services API batch service
Stars: ✭ 40 (-72.97%)
Mutual labels:  geocoding, address
Expostal
Elixir binding for Libpostal - a library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.
Stars: ✭ 80 (-45.95%)
Mutual labels:  geocoding, address
lieu
Dedupe/batch geocode addresses and venues around the world with libpostal
Stars: ✭ 73 (-50.68%)
Mutual labels:  geocoding, address
addressr
Free Australian Address Validation, Search and Autocomplete
Stars: ✭ 46 (-68.92%)
Mutual labels:  geocoding, address
Awesome-Vision-Transformer-Collection
Variants of Vision Transformer and its downstream tasks
Stars: ✭ 124 (-16.22%)
Mutual labels:  segmentation
cryptaddress.now
A minimal service to detect which cryptocurrency an address corresponds to.
Stars: ✭ 23 (-84.46%)
Mutual labels:  address
rembg-greenscreen
Rembg Video Virtual Green Screen Edition
Stars: ✭ 210 (+41.89%)
Mutual labels:  segmentation
Brain-Tumor-Segmentation-using-Topological-Loss
A Tensorflow Implementation of Brain Tumor Segmentation using Topological Loss
Stars: ✭ 28 (-81.08%)
Mutual labels:  segmentation
medSeg
Medical Image Segmentation Toolkit based on PaddlePaddle - 基于paddle的医学影像分割框架
Stars: ✭ 88 (-40.54%)
Mutual labels:  segmentation
imgcrop
Simple image augmentation library focusing on random geometric cropping
Stars: ✭ 27 (-81.76%)
Mutual labels:  segmentation
ETCI-2021-Competition-on-Flood-Detection
Experiments on Flood Segmentation on Sentinel-1 SAR Imagery with Cyclical Pseudo Labeling and Noisy Student Training
Stars: ✭ 102 (-31.08%)
Mutual labels:  segmentation
net-EmailAddress
Multiple implementations on email address validation.
Stars: ✭ 12 (-91.89%)
Mutual labels:  address
segDGM CNN
Segment Deep Gray Matter on QSM images using 3D CNN
Stars: ✭ 16 (-89.19%)
Mutual labels:  segmentation
Awesome-Tensorflow2
基于Tensorflow2开发的优秀扩展包及项目
Stars: ✭ 45 (-69.59%)
Mutual labels:  segmentation
pyRANSAC-3D
A python tool for fitting primitives 3D shapes in point clouds using RANSAC algorithm
Stars: ✭ 253 (+70.95%)
Mutual labels:  segmentation
hyperseg
HyperSeg - Official PyTorch Implementation
Stars: ✭ 174 (+17.57%)
Mutual labels:  segmentation
SemanticSegmentation-Libtorch
Libtorch Examples
Stars: ✭ 38 (-74.32%)
Mutual labels:  segmentation
ais
Address Information System
Stars: ✭ 18 (-87.84%)
Mutual labels:  geocoding
Osmunda
An offline geocode library for android, powered by SQLite, using osm data. 离线地理编码Android库,基于SQLite,使用开放街道地图数据。
Stars: ✭ 37 (-75%)
Mutual labels:  geocoding
Linear-Attention-Mechanism
Attention mechanism
Stars: ✭ 27 (-81.76%)
Mutual labels:  segmentation

Java 8 CI Maven Central

介绍

本项目旨在将不规范(或者连续)的文本地址进行尽可能的标准化, 以及对两个地址进行相似度的计算

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

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

pom

<dependencies>
    <dependency>
        <!--  从1.2.0开始迁移到bitlap,原groupId: io.patamon.geocoding     -->
        <groupId>org.bitlap</groupId> 
        <artifactId>geocoding</artifactId>
        <version>1.3.0</version>
    </dependency>
</dependencies>

1. 数据测试

方法调用: Geocoding

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

1.1 标准化

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

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

1.2 相似度

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

1.3 自定义地址文件设置

// 文件生成方式见下文
val geocoding = GeocodingX("region_2021.dat")

1.4 自定义地址设置

// 100000000000 代表中国的ID
Geocoding.addRegionEntry(88888888, 100000000000, "尼玛省", RegionType.Province)
Geocoding.addRegionEntry(8888888, 88888888, "尼玛市", RegionType.City)
Geocoding.addRegionEntry(888888, 8888888, "泥煤市", RegionType.District)

>> 输入: 中国尼玛省尼玛市泥煤市泥煤大道888号xxx
>> 输出:
Address(
	provinceId=88888888, province=尼玛省, 
	cityId=8888888, city=尼玛市, 
	districtId=888888, district=泥煤市, 
	streetId=null, street=null, 
	townId=null, town=null, 
	villageId=null, village=null, 
	road=泥煤大道, 
	roadNum=888号, 
	buildingNum=null, 
	text=xxx
)

Tips: 可以从「国家标准地址库」中获取「父级城市ID」

2. 说明

2.1 标准地址库

项目目前采用的是 淘宝物流4级地址 的标准地址库, 也可以采用国家的标准地址库 (对应的github库, 中国5级行政区域mysql库).

导入中国5级行政区域mysql库注意事项

参考文档

2.2 标准地址库(兼容本项目)

标准库文件 描述 参考 感谢
region_2021.dat 国家标准地址库2021 ISSUE-163 TsLenMoweijiang.lin

使用方式:文件下载到classpath,使用自定义的GeocodingX类即可。

2.3 标准化

  1. 首先基于正则提取出道路、建筑物号等信息
  2. 省市区等匹配
    1. 将标准的地址库建立倒排索引
    2. 将文本从起始位置开始, 采用最大长度优先的方式匹配所有词条
    3. 对所有匹配结果进行标准行政区域从属关系校验

2.4 相似度计算

  1. 对输入的两个地址进行标准化
  2. 对省市区等信息分配不同的权重
  3. 对道路号, 建筑号进行语义处理, 分配权重
  4. 对剩余文本(text)使用IK Analyzer进行分词
  5. 对两个结果集使用余弦相似度算法计算相似度

项目参考address-semantic-search,简化了流程,修复了各种不规则错误,使得使用更加方便。

感谢

Release Log

  • 1.1.3
    • 新增自定义地址设置
  • 1.1.4
    • 修复一些匹配错误的bug
  • 1.1.6
    • 升级地址库和包版本, 修复一些匹配错误的地址
  • 1.2.0
    • geocoding项目转移到组织:bitlap/geocoding
  • 1.3.0
    • 新增自定义地址文件库配置参数
    • 添加自定义地址新增replace参数
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].