Skip to content

Commit

Permalink
review serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
kermitt2 committed Feb 6, 2024
1 parent 8282dad commit 1ebc6c8
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -874,14 +874,14 @@ public String extractAllReferencesString(List<String> texts,
(localArticlesBySegment != null && localArticlesBySegment.size()>0) ) {
// output text
String divID = KeyGen.getKey().substring(0,7);
resultTEI.append("\t\t<div id=\"_"+ divID +"\">");
resultTEI.append("\t\t<div>");
resultTEI.append("\t\t\t<p id=\"_"+ divID +"\">");
String text = LayoutTokensUtil.toText(tokens);
// not affecting offsets:
text = text.replace("\n", " ").replace("\t", " ");
resultTEI.append(TextUtilities.HTMLEncode(text));
resultTEI.append("</div>\n");

resultTEI.append("\t\t<div type=\"references\">\n");
resultTEI.append("</p>\n");
resultTEI.append("\t\t\t<div type=\"references\">\n");
if (localPatentsBySegment != null && localPatentsBySegment.size()>0) {
for(PatentItem patentCitation : localPatentsBySegment) {
resultTEI.append(patentCitation.toTEI(true, divID) + "\n"); // true here means with offsets
Expand All @@ -892,6 +892,7 @@ public String extractAllReferencesString(List<String> texts,
resultTEI.append(articleCitation.toTEI(includeRawCitations) + "\n");
}
}
resultTEI.append("\t\t\t</div>\n");
resultTEI.append("\t\t</div>\n");
}

Expand Down

0 comments on commit 1ebc6c8

Please sign in to comment.