แสดงภาพความรู้สึกแยกตามประเภทข้อร้องเรียน
ต่อไปจะสร้าง data frame ชื่อ sentiment_twitter เพื่อดูว่าข้อร้องเรียนมีแนวโน้มเชิงลบมากกว่าจริงหรือไม่ โดยเฉลี่ย
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
การวิเคราะห์ข้อความเบื้องต้นใน R
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
sentiment_twitter <- tidy_twitter %>%
# Append the bing sentiment dictionary
___(___) %>%
# Count by complaint label and sentiment
___(___) %>%
# Spread the sentiment and count columns
___(___) %>%
# Compute overall_sentiment = positive - negative
___(___)