This repository is a PyTorch implementation of Stanford CS224n (Winter 2018) using Harry Potter texts + Twitter data.
All credits to the wonderful implementation on https://github.com/DSKSD/DeepNLP-models-Pytorch
- Skipgram (word2vec) implementation using only Naive Softmax (01, 02)
- GloVe (03)
- RNN Language Modeling with LSTM (06)
- Named Entity Recognition with Window Classification (04)
- Twitter Sentiment Analysis with Convolutional Neural Network Text Classification (08)
- Twitter Sentiment Analysis with FastText and pretrained twitter word embeddings
Note: I tried an advanced sentiment analysis with bidirectional 3 layer LSTM and the result was not impressive so I decided not to include the notebook in this series.
The first four models are implemented on Harry Potter books (text available.)
Due to the lack of sentiment annotation for Harry Potter books I decided to use Twitter data for sentiment analysis.
News classification with fast.ai has been added to the repository. With minimal training, we acheived 85% accuracy.
- Recursive RNN (TreeLSTM) (09)
- BiLSTM with Attention/Transformer (07)
- Advanced character-level CNN text classification
- Q-RNN
- Dynamic memory network for QA (10)
- Pointer Sentinel Mixture Models
Feel free to pull requests!
Farshad Niayeshpour farshadp.nia@gmail.com