Skip to content

PayalLakra/Sentiment-Analysis-Using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Amazon Review Sentiment Analysis

This project provides a GUI application to analyze the sentiment of Amazon reviews using Natural Language Processing (NLP) techniques. The application allows users to input reviews directly or fetch reviews from an Amazon product page and visualize the sentiment distribution.

Features

  • Input Reviews Directly: Users can type or paste Amazon reviews into the application.
  • Fetch Reviews from Amazon: Automatically fetch reviews from an Amazon product page URL.
  • Visualize Sentiment Distribution: Display a visual representation of the sentiment distribution of the reviews.

Libraries Used

  • pandas: For data manipulation and analysis. Used to load and preprocess the dataset containing Amazon reviews.
  • scikit-learn: Provides tools for data mining and analysis. Includes TfidfVectorizer for converting text data into numerical features.
  • nltk: The Natural Language Toolkit for natural language processing. Uses SentimentIntensityAnalyzer from the VADER module for sentiment analysis.
  • matplotlib: For creating visualizations. Plots the sentiment distribution of reviews.
  • requests: For sending HTTP requests to fetch reviews from Amazon product pages.
  • beautifulsoup4: Parses HTML and XML documents to extract review text from Amazon product pages.
  • tqdm: Provides a progress bar to indicate the status of fetching reviews.
  • tkinter: Standard Python interface for creating the graphical user interface (GUI) of the application.

Requirements

  • Python 3.x
  • Required Python libraries listed in requirements.txt

Installation

  1. Clone the Repository

    git clone https://github.com/PayalLakra/Sentiment-Analysis-Using-Python.git
    cd Sentiment-Analysis-Using-Python
  2. Create Virtual Environment

     python -m venv venv       #to create Virtual Environment
     .\venv\Scripts\activate   #to activate virtual environment (for Windows)
  3. Install the Required Python Packages

     pip install -r requirements.txt

    Ensure that you have the following libraries installed: pandas, scikit-learn, nltk, matplotlib, requests, beautifulsoup4, tqdm, tkinter.

Usage

  1. Run the Application

    Execute the following command to start the application:

    python CodeSentimentAnalysis.py
  2. Using the Application

    • Input Reviews Directly: Type or paste the review text into the input area and click the analyze button.
    • Fetch Reviews from Amazon: Enter an Amazon product page URL and click the fetch button to retrieve and analyze reviews.
    • View Results: The sentiment distribution of the reviews will be displayed visually.

Screenshots

Screenshot (188) Screenshot (190) Screenshot (220) Screenshot (221) Screenshot (222)

About

An Application to visualize Sentiment Distribution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published