Skip to content

Commit

Permalink
Reorder candidates
Browse files Browse the repository at this point in the history
  • Loading branch information
ensan-hcl committed Sep 19, 2023
1 parent 920e377 commit 038c336
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@ import SwiftUtils
}
emojiCandidates = self.getUniquePredictionCandidate(emojiCandidates, seenCandidates: seenCandidates)

return zeroHintResults.chained(predictionResults).chained(emojiCandidates.suffix(3)).max(count: 10, sortedBy: {$0.value < $1.value})
return Array(emojiCandidates.suffix(3)
.chained(predictionResults.max(count: 3, sortedBy: {$0.value < $1.value}))
.chained(zeroHintResults.max(count: 4, sortedBy: {$0.value < $1.value})))
}
}

0 comments on commit 038c336

Please sign in to comment.