https://github.com/zenklinov/regression_logistic_-_sentiment_analysis
This project demonstrates sentiment analysis, model based on movie review data using Logistic Regression. The model predicts whether a review expresses positive or negative sentiment based on the text provided. The application on #PepGuardiola from Twitter (X).
https://github.com/zenklinov/regression_logistic_-_sentiment_analysis
natural-language-processing nlp nltk scikit-learn sentiment-analysis
Last synced: about 2 months ago
JSON representation
This project demonstrates sentiment analysis, model based on movie review data using Logistic Regression. The model predicts whether a review expresses positive or negative sentiment based on the text provided. The application on #PepGuardiola from Twitter (X).
- Host: GitHub
- URL: https://github.com/zenklinov/regression_logistic_-_sentiment_analysis
- Owner: zenklinov
- License: apache-2.0
- Created: 2024-12-06T03:54:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-22T12:07:30.000Z (over 1 year ago)
- Last Synced: 2025-03-30T02:26:17.003Z (about 1 year ago)
- Topics: natural-language-processing, nlp, nltk, scikit-learn, sentiment-analysis
- Language: Jupyter Notebook
- Homepage:
- Size: 443 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sentiment Analysis with Logistic Regression
This project demonstrates sentiment analysis, model based on movie review data using Logistic Regression. The model predicts whether a review expresses positive or negative sentiment based on the text provided. The application on #PepGuardiola from Twitter (X).
## Project Structure
- `classify_sentiment.ipynb`: Jupyter Notebook of Input Data, Preprocessing, until Visualizing Sentiment Analysis using Logistic Regression.
- `app.py`: Main Streamlit application for running the sentiment analysis interface.
- `logistic_regression_model.joblib`: Pre-trained Logistic Regression model.
- `tfidf_vectorizer.joblib`: TF-IDF vectorizer for text preprocessing.
## Features
- Upload or input text to analyze sentiment.
- Pre-trained model for high-accuracy predictions.
- Real-time sentiment prediction.
## Requirements
Install the required dependencies with:
```bash
pip install -r requirements.txt
```
## Pre-trained Model and Vectorizer
The Logistic Regression model and TF-IDF vectorizer used in this project are pre-trained and available at the following locations:
- [Logistic Regression Model](https://github.com/zenklinov/Regression_Logistic_-_Sentiment_Analysis_Movie_Data/blob/main/logistic_regression_model.joblib)
- [TF-IDF Vectorizer](https://github.com/zenklinov/Regression_Logistic_-_Sentiment_Analysis_Movie_Data/blob/main/tfidf_vectorizer.joblib)
Ensure these files are downloaded and placed in the appropriate directory before running the application.
## Usage
Run the Streamlit application with the following command:
```bash
streamlit run app.py
```
## Try it on Streamlit:
https://regressionlogistic-sentimentanalysis-lgbxfzczme5clpzfct9qmg.streamlit.app/