RED-3133: Fixed bug in address combination rule
This commit is contained in:
parent
29ad27dea6
commit
c21cf3dd5c
@ -108,6 +108,12 @@ public class Section {
|
|||||||
lastEnd = -1;
|
lastEnd = -1;
|
||||||
numberOfMatchParts = 0;
|
numberOfMatchParts = 0;
|
||||||
foundParts = new HashSet<>();
|
foundParts = new HashSet<>();
|
||||||
|
if(entity.getType().equals(startType)){
|
||||||
|
lastEnd = entity.getEnd();
|
||||||
|
start = entity.getStart();
|
||||||
|
foundParts.add(entity.getType());
|
||||||
|
numberOfMatchParts++;
|
||||||
|
}
|
||||||
} else if(entity.getType().equals(startType) && start != -1){
|
} else if(entity.getType().equals(startType) && start != -1){
|
||||||
if(numberOfMatchParts >= minPartMatches) {
|
if(numberOfMatchParts >= minPartMatches) {
|
||||||
String value = searchText.substring(start, lastEnd);
|
String value = searchText.substring(start, lastEnd);
|
||||||
@ -117,6 +123,8 @@ public class Section {
|
|||||||
lastEnd = entity.getEnd();
|
lastEnd = entity.getEnd();
|
||||||
numberOfMatchParts = 0;
|
numberOfMatchParts = 0;
|
||||||
foundParts = new HashSet<>();
|
foundParts = new HashSet<>();
|
||||||
|
foundParts.add(entity.getType());
|
||||||
|
numberOfMatchParts++;
|
||||||
} else if(start != -1 && combineSet.contains(entity.getType()) && entity.getStart() - lastEnd < maxDistanceBetween){
|
} else if(start != -1 && combineSet.contains(entity.getType()) && entity.getStart() - lastEnd < maxDistanceBetween){
|
||||||
lastEnd = entity.getEnd();
|
lastEnd = entity.getEnd();
|
||||||
numberOfMatchParts++;
|
numberOfMatchParts++;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user