Classification of sentences depending on polarity- Positive or Negative achieved using training on the IMDB Dataset
Concepts
- RNN
- LSTM
- Word Embeddings
- Multilayer and Bi-Directional RNNs
RESULTS
Trained for 5 epochs on Kaggle.
Test Accuracy of ~90%
Simple-RNN : Used simple one layer RNN with no pretrained embeddings.
Improved-RNN : Used LSTM along with glove-6b embeddings, with a 2 layered bi-directional RNN.
- PyTorch
- Torchtext (Used
torchtext.legacy
) - Spacy
- You can pretrain the model
- You can use the predict sentiment to try your own sentences
Thanks to the author of this for this amazing repo and its explanation and help.