Vizualizarea sentimentului
Hai să creăm un set de date word_counts și să explorăm ce cuvinte sunt asociate cu fiecare sentiment din datele noastre de pe Twitter.
Acest exercițiu face parte din cursul
Introducere în analiza textului în R
Exercițiu interactiv practic
Încearcă acest exercițiu completând acest cod de exemplu.
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(___)