Skip to content

Commit

Permalink
Remove empty lines in gold standard loading (#282)
Browse files Browse the repository at this point in the history
Due to a minor bug, empty lines in the CSVs of goldstandards were not properly omitted. As such, the goldstandards (in some cases like historical TeaStore UME) expected more than intended because of the empty line (that naturally was never in the results. This bug is fixed now by removing blank lines when loading goldstandard files.
  • Loading branch information
Gram21 authored Oct 16, 2023
1 parent f166743 commit d653a13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public ImmutableList<String> getSamCodeGoldStandard() {
String codeElementId = parts[2];
goldStandard.add(TraceLinkUtilities.createTraceLinkString(modelElementId, codeElementId));
}
goldStandard.removeIf(String::isBlank);
return goldStandard.toImmutable();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ public ImmutableList<String> getTlrGoldStandard() {
logger.error(e.getMessage(), e);
}
goldLinks.remove(0);
goldLinks.removeIf(String::isBlank);
return Lists.immutable.ofAll(goldLinks);
}

Expand All @@ -236,6 +237,7 @@ public MutableList<String> getMissingTextForModelElementGoldStandard() {
logger.error(e.getMessage(), e);
}
goldLinks.remove("missingModelElementID");
goldLinks.removeIf(String::isBlank);
return Lists.mutable.ofAll(goldLinks);
}

Expand Down

0 comments on commit d653a13

Please sign in to comment.