NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit
Introduction
NeuralClassifier is designed for quick implementation of neural models for hierarchical multi-label classification task, which is more challenging and common in real-world scenarios. A salient feature is that NeuralClassifier currently provides a variety of text encoders, such as FastText, TextCNN, TextRNN, RCNN, VDCNN, DPCNN, DRNN, AttentiveConvNet and Transformer encoder, etc. It also supports other text classification scenarios, including binary-class and multi-class classification. It is built on PyTorch. Experiments show that models built in our toolkit achieve comparable performance with reported results in the literature.
Support tasks
Binary-class text classifcation
Multi-class text classification
Multi-label text classification
Hiearchical (multi-label) text classification (HMC)
NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit
Introduction
NeuralClassifier is designed for quick implementation of neural models for hierarchical multi-label classification task, which is more challenging and common in real-world scenarios. A salient feature is that NeuralClassifier currently provides a variety of text encoders, such as FastText, TextCNN, TextRNN, RCNN, VDCNN, DPCNN, DRNN, AttentiveConvNet and Transformer encoder, etc. It also supports other text classification scenarios, including binary-class and multi-class classification. It is built on PyTorch. Experiments show that models built in our toolkit achieve comparable performance with reported results in the literature.
Support tasks
Support text encoders
TextCNN (Kim, 2014)
RCNN (Lai et al., 2015)
TextRNN (Liu et al., 2016)
FastText (Joulin et al., 2016)
VDCNN (Conneau et al., 2016)
DPCNN (Johnson and Zhang, 2017)
AttentiveConvNet (Yin and Schutze, 2017)
DRNN (Wang, 2018)
Region embedding (Qiao et al., 2018)
Transformer encoder (Vaswani et al., 2017)
Star-Transformer encoder (Guo et al., 2019)
HMCN(Wehrmann et al.,2018)
Requirement
Python 3
PyTorch 0.4+
Numpy 1.14.3+
System Architecture
Usage
Training
How to train a non-hierarchical classifier
FastText、TextCNN、TextRNN、TextRCNN、DRNN、VDCNN、DPCNN、AttentiveConvNet、Transformer.How to train a hierarchical classifier using hierarchial penalty
python train.py conf/train.hierar.jsonFastText、TextCNN、TextRNN、TextRCNN、DRNN、VDCNN、DPCNN、AttentiveConvNet、TransformerHow to train a hierarchical classifier with HMCN
python train.py conf/train.hmcn.jsonHMCNDetail configurations and explanations see Configuration.
The training info will be outputted in standard output and log.logger_file.
Evaluation
The evaluation info will be outputed in eval.dir.
Prediction
The predict info will be outputed in predict.txt.
Input Data Format
Performance
0. Dataset
1. Compare with state-of-the-art
2. Different text encoders
3. Hierarchical vs Flat
Acknowledgement
Some public codes are referenced by our toolkit:
Update