My first thought is to rank items by totalVotes / score
. This would prioritize posts that get lots of votes in both directions.
Example:
def getControversialScore(upvotes, downvotes):
return (upvotes + downvotes) / abs(upvotes - downvotes)
getControversialScore(50, 10) # 1.5
getControversialScore(4, 5) # 9
getControversialScore(6, 30) # 1.44
getControversialScore(30, 28) # 29