Skip to content

This project implements a Bidirectional LSTM (BiLSTM) model for text classification using TensorFlow/Keras. The notebook includes data preprocessing, tokenization, sequence padding, model training, and evaluation. The dataset consists of labeled text data, and the model is trained to classify text into different categories.

Notifications You must be signed in to change notification settings

JayanthSrinivas06/Sarcasm-and-Irony-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Deep Learning for Text Classification (BiLSTM Model)

Overview

This project implements a Bidirectional LSTM (BiLSTM) model for text classification using TensorFlow/Keras. The notebook includes data preprocessing, tokenization, sequence padding, model training, and evaluation. The dataset consists of labeled text data, and the model is trained to classify text into different categories.

Features

  • Text Preprocessing: Cleans text by removing URLs, HTML tags, emojis, and punctuation
  • Tokenization & Padding: Converts text to numerical sequences using Tokenizer and pad_sequences
  • Deep Learning Model: Uses a Bidirectional LSTM with an embedding layer for classification
  • Evaluation Metrics: Computes accuracy, precision, recall, and F1-score

Model Architecture

  • Embedding Layer: Converts words into dense vectors
  • BiLSTM Layers: Captures context from both past and future words
  • Dropout Layers: Prevents overfitting
    *Fully Connected Layers: Outputs final classification probabilities

Requirements

Install the necessary dependencies using:

pip install pandas numpy scikit-learn tensorflow keras nltk emoji joblib torch

Team Members

Name Github Profile
Jayanth Srinivas Bommisetty GitHub profile
Sarvan Dattu Perumalla GitHub profile

Usage

  1. Clone the repository or download the sarcasm&irony.ipynb file.
  2. Open the Jupyter Notebook and execute cells sequentially.
  3. The model will preprocess the dataset, train using BiLSTM, and evaluate performance.
  4. Modify hyperparameters such as the LSTM units, dropout rates, and learning rate for experimentation.

Evaluation

The model is evaluated using categorical cross-entropy loss and accuracy. It also computes precision, recall, and F1-score for performance analysis.

Contributing

Contributions are welcome! Feel free to add enhancements or optimize the existing model.

About

This project implements a Bidirectional LSTM (BiLSTM) model for text classification using TensorFlow/Keras. The notebook includes data preprocessing, tokenization, sequence padding, model training, and evaluation. The dataset consists of labeled text data, and the model is trained to classify text into different categories.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published