This project performs sentiment analysis on customer reviews using Python, Pandas, TextBlob, and NLTK. The sentiment analysis categorizes the reviews as positive, negative, or neutral based on the sentiment polarity.
To get started, you need to install the required Python libraries. Open your terminal or command prompt and run:
pip install pandas textblob nltkAfter installing the libraries, download the necessary NLTK corpora by running the following Python code:
import nltk
nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')
nltk.download('wordnet')
nltk.download('brown')-
Place your
data.csvfile in the same directory as your script or Jupyter notebook. The CSV file should contain the following columns:id: Unique identifier for each reviewname: Name of the product or reviewerreviews.title: Title of the reviewreviews.text: Text of the review
-
Run the provided script or Jupyter notebook to perform sentiment analysis on the reviews. The notebook will categorize each review as positive, negative, or neutral based on the sentiment polarity and display the results.
data.csv: The CSV file containing the reviews.sentiment_analysis.ipynb: The Jupyter notebook containing the code for sentiment analysis.