การแสดงภาพ Sentiment
มาสร้างชุดข้อมูล word_counts และสำรวจว่าคำใดบ้างที่เชื่อมโยงกับแต่ละ sentiment ในข้อมูล Twitter ของเรา
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
การวิเคราะห์ข้อความเบื้องต้นใน R
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
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(___)