def polarity(text): """Return the text's sentiment polarity (-1 negative, 1 positive)""" return TextBlob(text).sentiment.polarity