Convert ratings to numerical value