Questão 33 · TJ-BA 2023 · Analista · Auditor

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:
  1. A)Sentimento: {'positive'}
  2. B)Sentimento: {'negative': 0.0, 'positive': 1}
  3. C)Sentimento: {'neg': 0.0, 'neu': 0.318, 'pos': 0.682, 'compound': 0.4588}
  4. D)Sentimento: {'negative': 0.1, 'positive': 0,4588, 'average': 0.2794}
  5. E)Sentimento: {'positive':no, 'positive':yes}
Responder e ver o gabarito comentado →

Grátis, sem cartão. No Chip você responde, vê o gabarito e o comentário com a pegadinha, o macete e o fundamento na lei.