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

Extract sentiment scores

Sentiment analysis is useful in social media monitoring since it gives an overview of people's sentiments.

Climate change is a widely discussed topic for which the perceptions range from being a severe threat to nothing but a hoax.

In this exercise, you will perform sentiment analysis and extract the sentiment scores for tweets on "Climate change".

You will use those sentiment scores in the next exercise to plot and analyze how the collective sentiment varies among people.

Tweets on "Climate change", extracted using search_tweets(), have been pre-loaded as tweets_cc.

The library syuzhet has been pre-loaded for this exercise.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Analyzing Social Media Data in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Perform sentiment analysis for tweets on "Climate change".
  • View the sentiment scores.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Perform sentiment analysis for tweets on `Climate change` 
sa.value <- ___(tweets_cc$___)

# View the sentiment scores
head(___, 10)
แก้ไขและรันโค้ด