3.0.3 • Published 6 months ago
address-smart-parse v3.0.3
💐python版本,结合自然语言处理、深度学习识别,识别率更加准确
智能识别收货地址(支持省市区县街道/姓名/电话/邮编识别)
支持以下数据格式
注意:地址、姓名、电话、邮编用空格或者特殊字符分开
js支持地址格式
1. 广东省珠海市香洲区盘山路28号幸福茶庄,陈景勇,13593464918
2. 马云,陕西省西安市雁塔区丈八沟街道高新四路高新大都荟 13593464918
3. 陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918
4. 西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918
5. 雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918
6. 收货人: 李节霁
手机号码: 15180231234
所在地区: 浙江省金华市婺城区西关街道
详细地址: 金磐路上坞街
7. 收货人: 马云
手机号码: 150-3569-6956
详细地址: 河北省石家庄市新华区中华北大街68号鹿城商务中心6号楼1413室
使用方法
npm install address-smart-parse
version: < 3.0
/** * smart 解析地址 * @param event-识别的地址 * @returns <obj> */ import smart from 'address-smart-parse'
smart("陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918 211381198512096810")
> version: >=3.0
smart(str) 新增参数 address
```js
/**
* smart 解析地址
* @param event-识别的地址
* @param address-地址列表 数据格式请参考 https://github.com/modood/Administrative-divisions-of-China/blob/master/dist/streets.json
* address 可不传,不传则默认识别到省/市/区县 三级信息
* @returns <obj>
*/
// 使用包自带的地址数据
import {smart, address} from 'address-smart-parse'
smart("陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918 211381198512096810", address)
// 使用自己的数据
import {smart} from 'address-smart-parse'
const myAddress = [...]// 数据格式请参考 https://github.com/modood/Administrative-divisions-of-China/blob/master/dist/streets.json
smart("陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918 211381198512096810", myAddress)
生成数据格式
{
"zipCode":"710061",
"province":"陕西省",
"provinceCode":"61",
"city":"西安市",
"cityCode":"6101",
"county":"雁塔区",
"countyCode":"610113",
"street":"丈八沟街道",
"streetCode":"610113007",
"address":"高新四路高新大都荟",
"name":"刘国良",
"phone":"13593464918",
"idCard":"211381198512096810"
}
地址数据来源:中华人民共和国行政区划
邮编数据来源:中华人民共和国邮编
LICENSE:Apache License
IDE:致谢JetBrains为本项目提供免费license支持
qq交流群
Star History
3.0.3
6 months ago
3.0.2
6 months ago
3.0.1
6 months ago
2.0.17
1 year ago
2.0.15
1 year ago
2.0.16
1 year ago
2.0.13
1 year ago
2.0.5
1 year ago
2.0.14
1 year ago
2.0.11
1 year ago
2.0.7
1 year ago
2.0.12
1 year ago
2.0.6
1 year ago
2.0.9
1 year ago
2.0.10
1 year ago
2.0.8
1 year ago
2.0.3
1 year ago
2.0.4
1 year ago
2.0.2
1 year ago
2.0.1
1 year ago
2.0.0
1 year ago
1.0.0
5 years ago