Skip to content

Commit

Permalink
Merge branch 'master' into tensorflow-2.16
Browse files Browse the repository at this point in the history
  • Loading branch information
kermitt2 committed Oct 23, 2024
2 parents e2af354 + 7b07000 commit f695b0b
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1234,17 +1234,19 @@ public Document createTraining(File inputFile,
"\t\t\t\t<biblStruct>\n\t\t\t\t\t<analytic>\n\n");

for (LabeledReferenceResult ref : references) {
if ( (ref.getReferenceText() != null) && (ref.getReferenceText().trim().length() > 0) ) {
if ( StringUtils.isNotBlank(ref.getReferenceText()) ) {
BiblioItem bib = parsers.getCitationParser().processingString(ref.getReferenceText(), 0);
String authorSequence = bib.getAuthors();
if ((authorSequence != null) && (authorSequence.trim().length() > 0) ) {
/*List<String> inputs = new ArrayList<String>();
inputs.add(authorSequence);*/
StringBuilder bufferName = parsers.getAuthorParser().trainingExtraction(authorSequence, false);
if ( (bufferName != null) && (bufferName.length()>0) ) {
writerName.write("\n\t\t\t\t\t\t<author>");
writerName.write(bufferName.toString());
writerName.write("</author>\n");
if (bib != null) {
String authorSequence = bib.getAuthors();
if (StringUtils.isNotBlank(authorSequence)) {
/*List<String> inputs = new ArrayList<String>();
inputs.add(authorSequence);*/
StringBuilder bufferName = parsers.getAuthorParser().trainingExtraction(authorSequence, false);
if ((bufferName != null) && (bufferName.length() > 0)) {
writerName.write("\n\t\t\t\t\t\t<author>");
writerName.write(bufferName.toString());
writerName.write("</author>\n");
}
}
}
}
Expand Down

0 comments on commit f695b0b

Please sign in to comment.