Skip to content

Commit

Permalink
Fix mistake in sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
ahobsonsayers committed Dec 26, 2024
1 parent c89bf1b commit fd08f71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions goodreads/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ func sortBookOverviewsByTitleSimilarity(bookOverviews []BookOverview, title stri

similarities := make(map[string]float64)
for _, book := range bookOverviews {
normalisedBookTitle := normaliseBookTitle(book.Title)
similarities[normalisedBookTitle] = strutil.Similarity(
normalisedBookTitle,
similarities[book.Title] = strutil.Similarity(
normaliseBookTitle(book.Title),
normalisedDesiredTitle,
metrics.NewJaroWinkler(),
)
Expand Down

0 comments on commit fd08f71

Please sign in to comment.