nlp-transfer
Borealis AI Internship Project (Summer 2018)
This is Yunshu's Borealis AI internship project Emperical study on transfer learning for text classification**
CNN text classification is modified from https://github.com/dennybritz/cnn-text-classification-tf and https://github.com/alexander-rakhlin/CNN-for-Sentence-Classification-in-Keras
RNN text classification is modified from https://github.com/roomylee/rnn-text-classification-tf
FastText text classification is modified from https://github.com/brightmart/text_classification
Sentence similarity measurement is modified from https://github.com/nlptown/nlp-notebooks/blob/master/Simple%20Sentence%20Similarity.ipynb
**By: Yunshu Du
Sept, 2018**
Requirements
Python 3
Tensorflow > 1.7
Numpy
Training
Train once (in default config):
python3 ./train.py
Train with all config combinations using CNN model:
StackExchange Data
./run_se_cnn.sh
SICK Data
./run_sick_cnn.sh
Can also run RNN and FastText in similar way (.sh scripts)
check FLAGS defined in train.py for detailed description of configurations
Sentence similarity
Under folder "sentence_similarity"
Compute similarity using Universal Sentence Encoder
python3 USE.py
Compute similarity using other baseline methods
python3 sent_sim.py
References