Pull request #439: RED-4799
Merge in RED/redaction-service from RED-4799-fix to master * commit '2b7972315f655bd296a03cae8cc5e4846d47bbce': RED-4799
This commit is contained in:
commit
1d8e86e4f6
@ -152,6 +152,15 @@ public class EntitySearchUtils {
|
||||
List<Entity> wordsToRemove = new ArrayList<>();
|
||||
for (Entity word : entities) {
|
||||
for (Entity inner : entities) {
|
||||
// skip cross-type false positives
|
||||
if(word.getEntityType() == EntityType.FALSE_POSITIVE && inner.getEntityType() == EntityType.ENTITY && !inner.getType().equals(word.getType())){
|
||||
continue;
|
||||
}
|
||||
// skip cross-type false reccommendations
|
||||
if(word.getEntityType() == EntityType.FALSE_RECOMMENDATION && inner.getEntityType() == EntityType.RECOMMENDATION && !inner.getType().equals(word.getType())){
|
||||
continue;
|
||||
}
|
||||
|
||||
if (inner.getWord().length() < word.getWord()
|
||||
.length() && inner.getStart() >= word.getStart() && inner.getEnd() <= word.getEnd() && word != inner && word.getSectionNumber() == inner.getSectionNumber()) {
|
||||
if (word.getEntityType().equals(EntityType.RECOMMENDATION) && inner.getEntityType().equals(EntityType.ENTITY)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user