This repository contains code for text multi-classification tasks. The following four models are implemented:
- Naive Bayes classifier using Bag of words feature
- Linear SVM
- Neural network
- Long short-term memory network (LSTM)
cd tools
python data_process.py
python nb_svm_train.py nb
python nb_svm_train.py svm
python nb_svm_inference.py svm
Pay attention to the data path. Follow the steps in the 'svm_with_word2vec.ipynb'.
python nn_train.py
python nn_inference.py
Pay attention to the data path. Follow the steps in the 'LSTM.ipynb'.