This project focuses on sentiment analysis using machine learning and natural language processing techniques. The goal is to develop a Streamlit app capable of analyzing sentiments in various scenarios, including single-line reviews, multiple reviews from CSV files, and product reviews from Amazon URLs.
The Amazon reviews full score dataset is constructed by randomly taking 6,00,000 training samples and 1,30,000 testing samples for each review score from 1 to 5. In total there are 30,00,000 training samples and 6,50,000 testing samples.
- notebooks: Contains Jupyter notebooks with exploratory data analysis and model development.
- test files: Contains test files to test out sentiment analysis for multiple reviews.
- .streamlit: Contains the configuration file for the streamlit app's theme
- models.p: Stores serialized models for sentiment analysis.
- review_analyzer.py: Houses the Streamlit app code for interactive sentiment analysis.
- reviewscrapper.py: Includes Python scripts for web scraping reviews for a certain URL.
- requirements.txt: Lists the project dependencies for reproducibility.
-
Clone the repository:
git clone https://github.com/amri-tah/Amazon-Reviews-Sentiment-Analysis.git
-
Navigate to the project directory:
cd Amazon-Reviews-Sentiment-Analysis
-
Install dependencies:
pip install -r requirements.txt
-
Open terminal and run the Streamlit app:
streamlit run review_analyzer.py
-
Explore and run Jupyter notebook
B8_Amazon.ipynb
in thenotebooks
folder for data analysis and model development. -
Execute Python scripts in the
reviewscrapper.py
for web scraping. -
Run the Streamlit app for interactive sentiment analysis:
streamlit run review_analyzer.py