地址库解析逻辑

通过结巴分词获取到相应的信息 测试词典,浙江省,杭州市,临安区,临天路,农林大路 //获取分词结果中,结尾索引最大,同时起始索引最小的分词结果 //判断获取到的关键词后面是否有纯数字,如果没有数字,status就是0,如果有数字,单号为1,双号为2 两条测试数据,浙江省杭州市临安区农林大路998号2栋201,浙江省杭州市临安区临天路200号1号楼车库 获取到地址的 对应地址词条(roadname) 门牌号(no) 单双号(status) if (status ==1) select * from address_area where roadname = 【对应地址词条】 and status in (0,1) and no>startno and no< endno if (status ==2) select * from address_area where roadname = 【对应地址词条】 and status in (0,2) and no>startno and no< endno if (status ==0) select * from address_area where roadname = 【对应地址词条】 and status = 0 and no>startno and no< endno ![image.png](https://cos.easydoc.net/81242367/files/k3hgvwb1.png)