@autodidaddict The rerank function could be simplified to the following and retain the same functionality.
defp rerank(scores) do
scores
|> Enum.sort_by(&elem(&1, 1), :desc)
|> Enum.take(10)
end
@autodidaddict The rerank function could be simplified to the following and retain the same functionality.
defp rerank(scores) do
scores
|> Enum.sort_by(&elem(&1, 1), :desc)
|> Enum.take(10)
end