Pull request #330: RED-3133: Fixed wrong ai entries again

Merge in RED/redaction-service from RED-3133-Fix2 to master

* commit '8ac7c309d981c8899eca40872a49198284d15944':
  RED-3133: Fixed wrong ai entries again
This commit is contained in:
Dominique Eiflaender 2022-01-26 15:42:13 +01:00
commit 8ba2bd776d

View File

@ -78,7 +78,7 @@ public class Section {
.filter(nerEntity -> nerEntity.getType().equals(type)) .filter(nerEntity -> nerEntity.getType().equals(type))
.collect(Collectors.toSet()); .collect(Collectors.toSet());
Set<String> values = entitiesOfType.stream().map(Entity::getWord).collect(Collectors.toSet()); Set<String> values = entitiesOfType.stream().map(Entity::getWord).collect(Collectors.toSet());
Set<Entity> found = EntitySearchUtils.find(text, values, asType, headline, sectionNumber, false, false, Engine.NER); Set<Entity> found = EntitySearchUtils.find(searchText, values, asType, headline, sectionNumber, false, false, Engine.NER);
EntitySearchUtils.clearAndFindPositions(found, searchableText, dictionary); EntitySearchUtils.clearAndFindPositions(found, searchableText, dictionary);
Set<Entity> finalResult = new HashSet<>(); Set<Entity> finalResult = new HashSet<>();