Skip to content

Commit

Permalink
Fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
NyashaMuusha committed Mar 1, 2024
1 parent eb3bb91 commit a403633
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ public static Either<LinkInfo, List<ExternalLinkCandidate>> linkInteraction(
final var workCandidate = candidates.parallelStream()
.unordered()
.map(candidate -> new WorkCandidate(candidate,
LinkerUtils.calcNormalizedScore(candidate.demographicData(),
interaction.demographicData()),
LinkerUtils.determineLinkingRule(
candidate.demographicData(),
interaction.demographicData()
)
LinkerUtils.calcNormalizedScore(candidate.demographicData(),
interaction.demographicData()),
LinkerUtils.determineLinkingRule(
candidate.demographicData(),
interaction.demographicData()
)
))
.sorted((o1, o2) -> Float.compare(o2.score(), o1.score()))
.collect(Collectors.toCollection(ArrayList::new))
Expand Down Expand Up @@ -284,7 +284,7 @@ public static Either<LinkInfo, List<ExternalLinkCandidate>> linkInteraction(
linkToGoldenId,
validated1,
validated2,
firstCandidate.linkingRule());
firstCandidate.linkingRule());

if (linkToGoldenId.score() <= matchThreshold + 0.1) {
sendNotification(Notification.NotificationType.ABOVE_THRESHOLD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public final class LinkerUtils {

private LinkerUtils() {
}

public static float calcNormalizedScore(
final CustomDemographicData goldenRecord,
final CustomDemographicData interaction) {
if (CustomLinkerDeterministic.linkDeterministicMatch(goldenRecord, interaction)) {
return 1.0F;
}
return CustomLinkerProbabilistic.linkProbabilisticScore(goldenRecord, interaction);

}

public static LinkingRule determineLinkingRule(
Expand All @@ -28,6 +28,5 @@ public static LinkingRule determineLinkingRule(
return LinkingRule.DETERMINISTIC;
}
return LinkingRule.PROBABILISTIC;
}

}
}

0 comments on commit a403633

Please sign in to comment.