A Streamlit-based web application that performs sentiment analysis on user-provided text or news articles. It supports multilingual text analysis by using Google Translate API for automatic translation.
✅ Sentiment Analysis using VADER (NLTK's SentimentIntensityAnalyzer)
✅ Supports Multiple Languages via Google Translate API
✅ Two Modes:
- Text Analysis: Users can enter any text for sentiment analysis.
- News Article Analysis: Users can provide a URL, and the app extracts and analyzes the sentiment of the summary.
✅ Graphical Visualization of sentiment scores using Matplotlib
✅ User-friendly UI built with Streamlit
git clone https://github.com/your-username/sentiment-analysis-app.git
cd sentiment-analysis-apppython3 -m venv venv
source venv/bin/activate # For macOS/Linux
venv\Scripts\activate # For Windowspip3 install -r requirements.txtThe app requires the following Python libraries:
pip3 install streamlit
pip3 install nltk
pip3 install matplotlib
pip3 install newspaper3k
pip3 install deep-translatorstreamlit run sentiment_app.pyThe app will open in your web browser.
- The user enters a text.
- The app detects the language.
- If it's not English, it gets translated.
- The app performs sentiment analysis using VADER (NLTK).
- It returns:
- Sentiment Score (range:
-1to1). - Sentiment Category (
Positive,Neutral,Negative). - Bar Chart for visualization.
- Sentiment Score (range:
- The user enters a news article URL.
- The app extracts the text from the article.
- The text is analyzed for sentiment.
- A graph is generated.
| Sentiment Score | Interpretation |
|---|---|
> 0 |
Positive Sentiment |
= 0 |
Neutral Sentiment |
< 0 |
Negative Sentiment |
🔹 Add Emotion Detection (Happy, Sad, Angry, etc.)
🔹 Use Deep Learning models for sentiment analysis
🔹 Improve language translation accuracy
This project is open-source.
Feel free to fork the repository, make improvements, and submit a pull request.
Happy Coding! 🚀