Skip to content
Graph Convolutional Networks for Text Classification. AAAI 2019
Branch: master
Clone or download
Latest commit 70aa596 Jun 28, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Delete wiki_shuffle.txt Apr 24, 2019
results update slides Nov 25, 2018
README.md Update README.md Apr 2, 2019
__init__.py first commit Sep 10, 2018
bow.py first commit Sep 10, 2018
build_corpus.py first commit Sep 10, 2018
build_graph.py dataset names as args Nov 21, 2018
doc2vec.py first commit Sep 10, 2018
inits.py first commit Sep 10, 2018
layers.py first commit Sep 10, 2018
metrics.py first commit Sep 10, 2018
models.py add featureless=True to alleviate memory issue Jan 19, 2019
plot_dim.py first commit Sep 10, 2018
plot_prop.py first commit Sep 10, 2018
plot_window.py first commit Sep 10, 2018
prepare_data.py add data preparing script Oct 14, 2018
remove_words.py Update remove_words.py Jun 28, 2019
train.py dataset names as args Nov 21, 2018
utils.py first commit Sep 10, 2018
visualize.py add word visualization Oct 13, 2018
visualize_words.py add word visualization Oct 13, 2018
wordnet.py first commit Sep 10, 2018

README.md

text_gcn

The implementation of Text GCN in our paper:

Liang Yao, Chengsheng Mao, Yuan Luo. "Graph Convolutional Networks for Text Classification." In 33rd AAAI Conference on Artificial Intelligence (AAAI-19)

Require

Python 2.7 or 3.6

Tensorflow >= 1.4.0

Reproducing Results

  1. Run python remove_words.py 20ng

  2. Run python build_graph.py 20ng

  3. Run python train.py 20ng

  4. Change 20ng in above 3 command lines to R8, R52, ohsumed and mr when producing results for other datasets.

Example input data

  1. /data/20ng.txt indicates document names, training/test split, document labels. Each line is for a document.

  2. /data/corpus/20ng.txt contains raw text of each document, each line is for the corresponding line in /data/20ng.txt

  3. prepare_data.py is an example for preparing your own data, note that '\n' is removed in your documents or sentences.

You can’t perform that action at this time.