Pular para o conteúdo principal

Questão de TI - Ciência de Dados e Inteligência Artificial — NLTK (Natural Language Toolkit) — FCC 2023

TI - Ciência de Dados e Inteligência ArtificialNLTK (Natural Language Toolkit)
Código
fc144581
Banca
FCC
Órgão
TJ BA
Ano
2023
Cargo
AJ ( )
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. ASentimento: { 'positive' }
  2. BSentimento: { 'negative' : 0.0, 'positive' : 1 }
  3. CSentimento: { 'neg' : 0.0, 'neu' : 0.318, 'pos' : 0.682, 'compound' : 0.4588}
  4. DSentimento: { 'negative' : 0.1, 'positive' : 0,4588, 'average': 0.2794}
  5. ESentimento: { 'positive' : no, 'positive' : yes}
Revelar gabarito e comentário

GabaritoC — Sentimento: { 'neg' : 0.0, 'neu' : 0.318, 'pos' : 0.682, 'compound' : 0.4588}

Link permanente: /questoes/fc144581