Skip to content

Niousha12/Text_Classification_via_GNN

Repository files navigation

TextING

Pytorch implementation for the ACL2020 paper Every Document Owns Its Structure: Inductive Text Classification via Graph Neural Networks.

For official code please refer to TextING repository.

Some functions are based on Official Code and Text GCN. Thank for their work.

Requirements

  • Python 3.8.5
  • install requirements.txt

Usage

Download pre-trained word embeddings glove.6B.300d.txt from here and unzip to the ./pretrained_models.

Build graphs from the datasets in data/corpus/ as:

python build_graph.py [DATASET] [WINSIZE]

Provided datasets include mr,ohsumed,R8andR52. The default sliding window size is 3.

Start training and inference as:

python pre_dataloader [--dataset DATASET]

python train.py [--dataset DATASET] [--learning_rate LR]
                [--epochs EPOCHS] [--batch_size BATCHSIZE]
                [--hidden HIDDEN] [--steps STEPS]
                [--dropout DROPOUT] [--weight_decay WD]

Citation

@inproceedings{zhang2020every,
  title={Every Document Owns Its Structure: Inductive Text Classification via Graph Neural Networks},
  author={Zhang, Yufeng and Yu, Xueli and Cui, Zeyu and Wu, Shu and Wen, Zhongzhen and Wang, Liang},
  booktitle="Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics",
  year={2020}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages