Let's continue with our Jupyter Notebook session and walk through how to install and use the VADER sentiment analysis library. First, we will walk through an example of using manual input and then learn how to load data from a file.
Manual input
Follow these steps to learn how to use manual input in VADER:
- Import the NLTK library and download the vader_lexicon library so that all the necessary functions and features will be available:
In[]: import nltk
nltk.download('vader_lexicon')
The output will look as follows,where the package download will be confirmed and the output is verified as True:
- Import SentimentIntensityAnalyzer from the NLTK Vader library. There will be no output when you run the cell:
In[]:from nltk.sentiment.vader import SentimentIntensityAnalyzer
- To make it easier, we will assign...