This repository implements several hierarchical and non-hierarchical Deep Learning models in Tensorflow for text classification of documents. It also supports pre-trained word or character embeddings as input to the models.
The module "model/model.py" contains a Feed Forward Neural Network (FFN), a Recurrent Neural Network (RNN) and a Convolutional Neural Network (CNN). The model "model/hierarchical_model.py" contains the following hierarchical models:
- A RNN in the word-level with a RNN in the sentence-level.
- A CNN in the word-level with a RNN in the sentence-level.
- A FFN in the word-level with a RNN in the sentence-level.
- A RNN in the word-level, a RNN in the sentence-level and a Conditional Random Field (CRF) as a final layer.
- Tensorflow 1.8
- numpy
- scipy
- matplotlib