python from snownlp import SnowNLP s = SnowNLP(text) sentiment = s.sentiments if sentiment > 0.5: elif sentiment < 0.5: else: