This repo provides extension to the implementation of SQLNet and added modules for using character embeddings along with word embeddings for training the bidirectional LSTMs.
The code is implemented in python2.7 using the PyTorch 0.3.1. For install other requirements execute requirements.txt as
pip install -r requirements.txt
We have installed and extracted the pretrained GLOVE embeddings which can be used directly for training and testing the model. We have added a class inside word_embedding.py called CharacterEmbedding which contains modules and components related to character embeddings.
python train.py --baseline
python train.py --ca
python train.py --ca --train_emb
python train_embed_char.py --ca
For testing the model first execute any of the above train commands which trains and saves the best model, then execute the corresponding test command as follows:
python test.py --baseline
python test.py --ca
python test.py --ca --train_emb
python test_embed_char.py --ca