text_gcn.pytorch icon indicating copy to clipboard operation
text_gcn.pytorch copied to clipboard

PyTorch implementation of "Graph Convolutional Networks for Text Classification. Yao et al. AAAI2019."

text_gcn.pytorch

This project implements "Graph Convolutional Networks for Text Classification. Yao et al. AAAI2019." in PyTorch.

This implementation highly based on official code yao8839836/text_gcn.

Require

  • Python 3.6
  • PyTorch 1.0

Running training and evaluation

  1. cd ./preprocess
  2. Run python remove_words.py <dataset>
  3. Run python build_graph.py <dataset>
  4. cd ..
  5. Run python train.py <dataset>
  6. Replace <dataset> with 20ng, R8, R52, ohsumed or mr

Visualization

R8

R8_gcn_test