A Benchmark of Text Classification in PyTorch
We are trying to build a Benchmark for Text Classification including
Many Text Classification DataSet, including Sentiment/Topic Classfication, popular language(e.g. English and Chinese). Meanwhile, a basic word embedding is provided.
Implment many popular and state-of-art Models, especially in deep neural network.
We have done some dataset and models
- IMDB
 - SST
 - Trec
 
- FastText
 - BasicCNN (KimCNN,MultiLayerCNN, Multi-perspective CNN)
 - InceptionCNN
 - LSTM (BILSTM, StackLSTM)
 - LSTM with Attention (Self Attention / Quantum Attention)
 - Hybrids between CNN and RNN (RCNN, C-LSTM)
 - Transformer - Attention is all you need
 - ConS2S
 - Capsule
 - Quantum-inspired NN
 
You should have install these librarys
python3 torch torchtext (optional)
Dataset will be automatically configured in current path, or download manually your data in Dataset, step-by step.
including
Glove embeding Sentiment classfication dataset IMDB
Run in default setting
python main.pyCNN
python main.py --model cnnLSTM
python main.py --model lstm- Data preprossing framework
 - Models modules
 - Loss, Estimator and hyper-paramter tuning.
 - Test modules
 - More Dataset
 - More models
 
The core of this repository is models and dataset.
- 
dataloader/: loading all dataset such asIMDB,SST - 
models/: creating all models such asFastText,LSTM,CNN,Capsule,QuantumCNN,Multi-Head Attention - 
opts.py: Parameter and config info. - 
utils.py: tools. - 
dataHelper: data helper 
Welcome your issues and contribution!!!