Added debug logs

This commit is contained in:
Dominique Eifländer 2021-01-07 15:08:17 +01:00
parent c2fd749fec
commit 36a5bb5419

View File

@ -35,8 +35,14 @@ public class PositionUtil {
.sorted(Comparator.comparing(Entity::getStart)) .sorted(Comparator.comparing(Entity::getStart))
.collect(Collectors.toList()); .collect(Collectors.toList());
Entity firstEntity = orderedEntities.get(0); Entity firstEntity = orderedEntities.get(0);
List<EntityPositionSequence> positionSequences = text.getSequences(firstEntity.getWord(), dictionary.isCaseInsensitiveDictionary(firstEntity List<EntityPositionSequence> positionSequences;
try {
positionSequences = text.getSequences(firstEntity.getWord(), dictionary.isCaseInsensitiveDictionary(firstEntity
.getType()), firstEntity.getTargetSequences()); .getType()), firstEntity.getTargetSequences());
} catch (Exception e){
log.error("Problem occured at word: " + firstEntity.getWord() + "in text:" + text.toString());
return entities;
}
for (int i = 0; i <= orderedEntities.size() - 1; i++) { for (int i = 0; i <= orderedEntities.size() - 1; i++) {
try { try {