शुरू करेंमुफ़्त में शुरू करें

Loading VADER

Sentiment analysis provides us a small glimpse of the meaning of texts with a rather directly interpretable method. While it has its limitations, it's a good place to begin working with textual data. There's a number of out-of-the-box tools in Python we can use for sentiment analysis.

ds_tweets with the datetime index has been loaded for you.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Analyzing Social Media Data in Python

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Load SentimentIntensityAnalyzer from nltk.sentiment.vader.
  • Instantiate a new SentimentIntensityAnalyzer object.
  • Generate sentiment scores with the .apply() method and the analyzer's polarity_scores() function.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Load SentimentIntensityAnalyzer
____

# Instantiate new SentimentIntensityAnalyzer
sid = ____

# Generate sentiment scores
sentiment_scores = ds_tweets['text'].____(____)
कोड संपादित करें और चलाएँ