Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arindal1/sentiment-analysis-tf-keras
A python script for YouTube sentiment analysis using a Neural Network with TensorFlow and Keras.
https://github.com/arindal1/sentiment-analysis-tf-keras
keras machine-learning sentiment-analysis tensorflow youtube
Last synced: 3 days ago
JSON representation
A python script for YouTube sentiment analysis using a Neural Network with TensorFlow and Keras.
- Host: GitHub
- URL: https://github.com/arindal1/sentiment-analysis-tf-keras
- Owner: arindal1
- Created: 2023-10-16T18:22:51.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-16T19:10:32.000Z (about 1 year ago)
- Last Synced: 2023-10-17T08:23:06.128Z (about 1 year ago)
- Topics: keras, machine-learning, sentiment-analysis, tensorflow, youtube
- Language: Python
- Homepage:
- Size: 1.69 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sentiment Analysis with TensorFlow and Keras
This project demonstrates sentiment analysis using a neural network built with TensorFlow and Keras. The model is trained to classify text into three sentiment categories: negative, neutral, and positive.
## Introduction
Sentiment analysis, also known as opinion mining, involves analyzing and understanding the sentiment expressed in a piece of text. This project employs a neural network to predict the sentiment of input text.
## Installation
To set up and run this project, follow these steps:
1. Clone the repository:
```bash
git clone
cd
```2. Install the necessary dependencies:
## Usage
- **Preprocessing**: The text data is preprocessed and tokenized using TensorFlow's Tokenizer. The sequences are padded to a fixed length for consistency.
- **Model**: A neural network model is defined using Keras, with an Embedding layer, GlobalAveragePooling1D, and Dense layers. The model is compiled and trained on the provided dataset.
- **Evaluation**: The model is evaluated on a test dataset to measure its performance.
- **Interactive Prediction**: Users can interactively input a sentence for sentiment analysis, and the trained model predicts the sentiment of the input.
## Model Training
- If the saved model exists, it is loaded.
- If not, a new model is trained using the provided dataset and saved for future use.## Interactive Prediction
To predict sentiment for a custom input, run the provided script and follow the prompts.
```bash
python predict.py
```