Pull request #129: RED-1170: Do not use non dictionay hints vor local analysis

Merge in RED/redaction-service from RED-1170 to master

* commit 'aac4d0437e2f9e81f5f4a814dbc86e47b07f57d7':
  RED-1170: Do not use non dictionay hints vor local analysis
This commit is contained in:
Dominique Eiflaender 2021-03-15 11:56:38 +01:00
commit 6c33b7e2ae

View File

@ -66,7 +66,7 @@ public class EntityRedactionService {
Map<Integer, Set<Entity>> hintsPerSectionNumber = new HashMap<>();
documentEntities.stream().forEach(entity -> {
if (dictionary.isHint(entity.getType())) {
if (dictionary.isHint(entity.getType()) && entity.isDictionaryEntry()) {
hintsPerSectionNumber.computeIfAbsent(entity.getSectionNumber(), (x) -> new HashSet<>())
.add(entity);
}