Compare commits

...
Author SHA1 Message Date
Dominique Eifländer 629057bd46 Fix3 2021-10-19 15:17:01 +02:00
Dominique Eifländer 2b950740a5 Test2 2021-10-19 15:14:56 +02:00
Dominique Eifländer 4d0c5eda57 test 1 2021-10-19 14:52:55 +02:00
Dominique Eifländer 2f66d223fd Added some logs 2021-10-19 14:38:03 +02:00
3 changed files with 5 additions and 2 deletions
@@ -219,8 +219,8 @@ public class EntityRedactionService {
if (!local) {
Map<String, Set<String>> nerValuesPerType = getNerValues(sectionNumber, nerEntities, cellstarts);
nerValuesPerType.entrySet().forEach(entry -> {
EntitySearchUtils.addOrAddEngine(found, EntitySearchUtils.find(searchableString, entry.getValue(), entry
.getKey(), headline, sectionNumber, false, false, Engine.NER));
EntitySearchUtils.addEntitiesWithHigherRank(found, EntitySearchUtils.find(searchableString, entry.getValue(), entry
.getKey(), headline, sectionNumber, false, false, Engine.NER), dictionary);
});
}
@@ -146,9 +146,12 @@ public class EntitySearchUtils {
}
var existing = existingOptional.get();
log.info("existing: {}", existing);
log.info("found: {} ", found);
if(existing.getType().equals(found.getType())){
existing.getEngines().addAll(found.getEngines());
} else if (dictionary.getDictionaryRank(existing.getType()) <= dictionary.getDictionaryRank(found.getType())){
// found.getEngines().addAll(existing.getEngines());
entities.remove(found);
entities.add(found);
}