This project is a Twitter sentiment analysis application built using Flask. The application allows users to analyze the sentiment of tweets based on a specific keyword or hashtag provided in a CSV file. It leverages Natural Language Processing (NLP) techniques to classify tweets as positive, negative, or neutral.
- Sentiment Analysis: Analyzes the sentiment of each tweet and categorizes it as positive, negative, or neutral.
- Data Visualization: Provides visual representations of the sentiment distribution using charts.
- Flask: A micro web framework for Python to build the web application.
- Pandas: For data manipulation and analysis.
- NLTK: Natural Language Toolkit for performing sentiment analysis.
- Matplotlib/Plotly: For data visualization of sentiment analysis results.
- HTML/CSS/JavaScript: For frontend development.
-
Clone the repository:
git clone https://github.com/yourusername/twitter-sentiment-analysis.git cd twitter-sentiment-analysis
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
-
-
Install the required packages:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
-
Open your web browser and go to
http://127.0.0.1:5000
.