Considere o código Python a seguir:
import nltk
from nltk.sentiment import SentimentIntensityAnalyzer
s = SentimentIntensityAnalyzer ()
frase = "Hoje estou animado"
resultado = s-polarity_scores (frase)
print ("Sentimento:", resultado)
Executado em condições ideais, a saída será semelhante a: