Skip to content

Commit

Permalink
avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Dec 30, 2024
1 parent 3e006a6 commit 433a065
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ else if (config.getConsolidateCitations() == 2)
annexResults = label(annexFeatures);
//System.out.println(rese);

annexFigures = processFigures(annexResults, annexTokenization, doc, bodyFigures.size());
int startFigureID = bodyFigures != null ? bodyFigures.size() : 0;
annexFigures = processFigures(annexResults, annexTokenization, doc, startFigureID);

long numberFiguresInAnnex = Arrays.stream(annexResults.split("\n"))
.filter(r -> r.endsWith("I-" + TaggingLabels.FIGURE_LABEL))
Expand All @@ -355,7 +356,8 @@ else if (config.getConsolidateCitations() == 2)
.collect(Collectors.toList());
postProcessFigureCaptions(annexFigures, doc);

annexTables = processTables(annexResults, annexTokenization, doc, bodyTables.size());
int startTableID = bodyTables != null ? bodyTables.size() : 0;
annexTables = processTables(annexResults, annexTokenization, doc, startTableID);

long numberTablesInAnnex = Arrays.stream(bodyResults.split("\n"))
.filter(r -> r.endsWith("I-" + TaggingLabels.TABLE_LABEL))
Expand Down Expand Up @@ -2399,7 +2401,7 @@ protected List<Table> processTables(String rese,
}
}
results.add(result);
result.setId("" + tableId);
result.setId(String.valueOf(tableId));
tableId ++;
}
}
Expand Down

0 comments on commit 433a065

Please sign in to comment.