นับ Sentiment
โหลดชุดข้อมูล tidy_twitter ให้แล้ว มาดูกันว่า sentiment แบบไหนที่พบมากที่สุดในข้อมูล Twitter ของเรา
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
การวิเคราะห์ข้อความเบื้องต้นใน R
คำแนะนำการฝึกหัด
- Join
tidy_twitterกับ NRC sentiment dictionary - นับ sentiment ใน
sentiment_twitter - เรียงลำดับจำนวน sentiment จากมากไปน้อย
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Join tidy_twitter and the NRC sentiment dictionary
sentiment_twitter <- ___ %>%
___(___("nrc"))
# Count the sentiments in sentiment_twitter
___ %>%
___(___) %>%
# Arrange the sentiment counts in descending order
___(___)