This is a Python-based application that analyzes sentiment and emotions from text using TextBlob, NLTK, and VADER. It provides visualizations for sentiment trends and comparative analysis for multiple texts.
Check out the live preview of the app:
- Text Sentiment Analysis: Analyze the overall sentiment (positive, neutral, negative) and subjectivity of input text.
- Emotion Breakdown: Detailed emotion analysis (joy, sadness, neutral) using VADER.
- File Support: Extract text from PDF and DOCX files for analysis.
- Trend Analysis: Visualize trends in sentiment over time.
- Comparative Analysis: Compare sentiment and emotions across multiple texts.
- Python Libraries:
TextBlob
NLTK
(VADER Sentiment Analyzer)pypdf
docx
plotly
pandas
- Streamlit: For creating an interactive web app.
-
Clone the repository:
git clone https://github.com/jackh54/Sentiment-Analyis.git cd sentiment-analyis
-
Install the required Python packages:
pip install -r requirements.txt
-
Run the application:
streamlit run main.py
- Set a custom port with
--server.port ....
at the end.
- Set a custom port with
-
Open the app in your browser (default is http://localhost:8501).
-
Single Analysis:
- Type or paste text in the input box.
- Upload PDF or DOCX files to analyze their content.
- View the sentiment score, category, subjectivity, and emotion breakdown.
-
Comparative Analysis:
- Add multiple texts or files to compare their sentiments and emotions side-by-side.
-
Trend Visualization:
- Analyze historical sentiment data with trendlines and moving averages.
- Sentiment Score & Trend: Displays the sentiment score over time with a moving average.
- Subjectivity: Visualizes the subjectivity of analyzed texts.
- Emotion Breakdown: Shows how emotions like joy, sadness, and neutral vary across texts.
This project is open-source and available under the MIT License.