A web-based sentiment analysis tool that analyzes text input or CSV files to determine positive and negative sentiments. It visualizes the sentiment analysis results using charts and lists.
- Analyze individual text inputs for sentiment (positive/negative) and sentiment score.
- Upload and analyze CSV files containing reviews or comments.
- Visualize sentiment distribution using an interactive pie chart.
- Display detailed positive and negative review lists.
- Python 3.x
- Flask: Install via
pip install flask
. - Pandas: Install via
pip install pandas
. - Plotly: Install via
pip install plotly
.
- Clone this repository and navigate to the project folder:
git clone <repository_url> cd sentiment-analysis-tool
- Install the required Python libraries:
pip install -r requirements.txt
- Run the Flask application:
python app.py
- Open the tool in your browser at
http://127.0.0.1:5000
.
- Enter text in the input field.
- Click "Analyze Text" to get the sentiment and score. The analyze_sentiment function processes the text and returns: Sentiment label (Positive or Negative). Sentiment score for detailed insights.
- Upload a CSV file containing reviews/comments.
- View the count of positive/negative reviews and sentiment breakdown in a pie chart.
- Backend Flask: Python-based web framework.
- Frontend HTML/CSS: Responsive web design. Bootstrap: UI styling. Plotly.js: Interactive pie chart visualization.
- Libraries Pandas: For data manipulation. Plotly: For visualizations. Flask: Web server.