Skip to content

mohsenht/NLP_mid_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sentiment Analysis Using BiLSTM with and without Pretrained Word Embeddings

This project applies Bidirectional LSTM (BiLSTM) models for sentiment analysis, comparing self-trained word embeddings with pretrained GloVe embeddings.

Installation

Before running the scripts, install the required packages using the following command:

pip install tensorflow numpy matplotlib pandas scikit-learn

Dataset Download

  • Sentiment140 Dataset: Download from Kaggle
  • Unzip the dataset and place it in the project directory.

Pretrained Word Embeddings

  • GloVe Embeddings: Download from Stanford NLP GloVe
  • Use glove.6B.100d.txt and unzip it in the project directory.

Setup

Ensure both the dataset and embeddings are placed in the correct directory before running the scripts.

Running the Model

Run the following commands separately to train both models:

python model_with_self_embedding.py
python model_with_GloVe.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages