extended-entity-finding: increase threshold

This commit is contained in:
Kilian Schuettler 2024-10-22 15:09:38 +02:00
parent f9e7703063
commit 1db515acf0

View File

@ -34,7 +34,7 @@ import lombok.extern.slf4j.Slf4j;
@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE)
public class EntityFromPrecursorCreationService {
static double MATCH_THRESHOLD = 10; // Is compared to the average sum of distances in pdf coordinates for each corner of the bounding box of the entities
static double MATCH_THRESHOLD = 100; // Is compared to the average sum of distances in pdf coordinates for each corner of the bounding box of the entities
EntityFindingUtility entityFindingUtility;
DictionaryService dictionaryService;
RedactionServiceSettings settings;
@ -130,10 +130,8 @@ public class EntityFromPrecursorCreationService {
} else {
String section = precursorEntity.getManualOverwrite().getSection()
.orElse(null);
if ((section == null || section.isBlank())
&& precursorEntity.getSection() != null
&& !precursorEntity.getSection().isBlank()
&& precursorEntity.getEngines().contains(Engine.IMPORTED)) {
if ((section == null || section.isBlank()) && precursorEntity.getSection() != null && !precursorEntity.getSection().isBlank() && precursorEntity.getEngines()
.contains(Engine.IMPORTED)) {
section = precursorEntity.getSection();
}