Skip to content

Commit

Permalink
fix wrong label adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Dec 6, 2024
1 parent facc35e commit 17ad425
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,11 @@ public static String adjustInvalidSequenceOfStartLabels(String fulltextLabeledTe
String[] pieces = line.split("\t");
String label = pieces[pieces.length-1];
if (label.equals("I-"+TaggingLabels.FIGURE.getLabel())) {
if (previousLabel == null) {
continue;
} else if (previousLabel.equals("I-"+TaggingLabels.FIGURE.getLabel())) {
if (StringUtils.equals(previousLabel, "I-"+TaggingLabels.FIGURE.getLabel())) {
pieces[pieces.length-1] = TaggingLabels.FIGURE.getLabel();
}
} else if (label.equals("I-"+TaggingLabels.TABLE.getLabel())) {
if (previousLabel == null) {
continue;
} else if (previousLabel.equals("I-"+TaggingLabels.TABLE.getLabel())) {
if (StringUtils.equals(previousLabel, "I-"+TaggingLabels.TABLE.getLabel())) {
pieces[pieces.length-1] = TaggingLabels.TABLE.getLabel();
}
}
Expand Down

0 comments on commit 17ad425

Please sign in to comment.