This project is aimed at building a sarcasm classification model using natural language processing techniques and machine learning. The model is trained on a dataset of sarcastic and non-sarcastic headlines to predict whether a given sentence is sarcastic or not.
- Python 3.x
- Jupyter Notebook
- TensorFlow
- Keras
- NLTK
- WordCloud
- Matplotlib
- Pandas
- NumPy
Clone the repository to your local machine:
git clone https://github.com/your-username/sarcasm-classification.git
1-Open the Jupyter Notebook (sarcasm_classification.ipynb) in your local environment.
2-Execute the cells to preprocess data, train the model, and evaluate its performance.
3-Use the trained model for sarcasm prediction.
Text data is preprocessed by cleaning, tokenizing, and removing stop words. The cleaned data is then used for training.
The model consists of an embedding layer, LSTM layer, and a dense layer with a sigmoid activation function for binary classification.
The model's performance is evaluated on a validation set, and accuracy and loss curves are plotted.