เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

นับ 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
  ___(___)
แก้ไขและรันโค้ด