From 7ec9a8ea741dd65ba98bdc90b0263686b23cb5b0 Mon Sep 17 00:00:00 2001 From: "Hannes R. Brunsch" Date: Wed, 10 Jul 2024 10:25:34 +0200 Subject: [PATCH] fix: detection of multiply annotated tokens working again --- src/main/java/eu/snik/tag/DocxLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/snik/tag/DocxLoader.java b/src/main/java/eu/snik/tag/DocxLoader.java index f92d7bcf..9ba9ac13 100644 --- a/src/main/java/eu/snik/tag/DocxLoader.java +++ b/src/main/java/eu/snik/tag/DocxLoader.java @@ -142,14 +142,14 @@ public Collection getClasses() { comment.getContent().add(commentText); CommentReference commentRef = factory.createRCommentReference(); run.getContent().add(commentRef); - commentRef.setId(BigInteger.valueOf(commentId)); + commentRef.setId(BigInteger.valueOf(commentId)); */ Clazz clazz = new Clazz(label, labelToLocalName(label), tc.subtop); //System.out.println(text+" "+ clazz); if (processedLabels.contains(label)) { classes .stream() - .filter(c -> c.subtop() != clazz.subtop()) + .filter(c -> c.labels().contains(label) && (!c.subtop().equals(clazz.subtop()))) .findAny() .ifPresent( c -> {