添加围栏,限制匹配小区区域
This commit is contained in:
+6
-6
@@ -914,23 +914,23 @@ public class AddressParserServiceImpl implements AddressParserService {
|
|||||||
} else if (standardAddressScore > 0) {
|
} else if (standardAddressScore > 0) {
|
||||||
matchLevelScore = 0.8;
|
matchLevelScore = 0.8;
|
||||||
similarityScore = standardAddressScore * SIMILARITY_RATE;
|
similarityScore = standardAddressScore * SIMILARITY_RATE;
|
||||||
}else if(metaData.getId().equals(address.getPolygonSeaweedId())){
|
|
||||||
matchLevelScore = 0.7;
|
|
||||||
similarityScore = 0.05;
|
|
||||||
} else if(keywordScore > 0 && streetScore > 0){
|
} else if(keywordScore > 0 && streetScore > 0){
|
||||||
matchLevelScore = 0.6;
|
matchLevelScore = 0.7;
|
||||||
similarityScore = Math.max(streetScore, keywordScore * 0.8) * SIMILARITY_RATE;
|
similarityScore = Math.max(streetScore, keywordScore * 0.8) * SIMILARITY_RATE;
|
||||||
} else if (keywordScore > 0) {
|
} else if (keywordScore > 0) {
|
||||||
matchLevelScore = 0.5;
|
matchLevelScore = 0.6;
|
||||||
similarityScore = keywordScore * SIMILARITY_RATE;
|
similarityScore = keywordScore * SIMILARITY_RATE;
|
||||||
} else if (fuzzyKeywordsScore > 0) {
|
} else if (fuzzyKeywordsScore > 0) {
|
||||||
if(address.hasCoordinate() && metaData.getLng() != null && GeoUtils.calculateDistance(address.getLng(), address.getLat(),
|
if(address.hasCoordinate() && metaData.getLng() != null && GeoUtils.calculateDistance(address.getLng(), address.getLat(),
|
||||||
metaData.getLng(), metaData.getLat()) < 100){
|
metaData.getLng(), metaData.getLat()) < 100){
|
||||||
matchLevelScore = 0.6;
|
matchLevelScore = 0.7;
|
||||||
}else{
|
}else{
|
||||||
matchLevelScore = 0.4;
|
matchLevelScore = 0.4;
|
||||||
}
|
}
|
||||||
similarityScore = fuzzyKeywordsScore * SIMILARITY_RATE;
|
similarityScore = fuzzyKeywordsScore * SIMILARITY_RATE;
|
||||||
|
}else if(metaData.getId().equals(address.getPolygonSeaweedId())){
|
||||||
|
matchLevelScore = 0.4;
|
||||||
|
similarityScore = 0.05;
|
||||||
}
|
}
|
||||||
if (similarityScore > 0) {
|
if (similarityScore > 0) {
|
||||||
if(metaData.getBuildingType() != null){
|
if(metaData.getBuildingType() != null){
|
||||||
|
|||||||
Reference in New Issue
Block a user