Visualizzare il sentiment
Creiamo un insieme di dati word_counts ed esploriamo quali parole sono associate a ciascun sentiment nei nostri dati di Twitter.
Questo esercizio fa parte del corso
Introduzione all'analisi del testo in R
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
word_counts <- tidy_twitter %>%
# Append the NRC dictionary and filter for positive, fear, and trust
___(___) %>%
___(___) %>%
# Count by word and sentiment and keep the top 10 of each
___(___) %>%
group_by(___) %>%
___(___) %>%
ungroup() %>%
# Create a factor called word2 that has each word ordered by the count
mutate(___)