From 1db515acf05329ebf2f126a650acb8eb90ba8a57 Mon Sep 17 00:00:00 2001 From: Kilian Schuettler Date: Tue, 22 Oct 2024 15:09:38 +0200 Subject: [PATCH] extended-entity-finding: increase threshold --- .../document/EntityFromPrecursorCreationService.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/service/document/EntityFromPrecursorCreationService.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/service/document/EntityFromPrecursorCreationService.java index b8dd1268..cf1491e5 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/service/document/EntityFromPrecursorCreationService.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/service/document/EntityFromPrecursorCreationService.java @@ -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(); }