Skip to content

FoxerLee/TGCN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TGCN: A Novel Deep Learning Model for Text Classification

This project contains

Requirement

  • python 3.6
  • tensorflow 2.1.0
  • nltk 3.4.5
  • fasttext 0.9.2 (Optional)

Run

Preprocess

cd ./preprocess
python remove_words.py <dataset>
python build_graph.py <dataset>

The selections of <dataset> are R8, R52, 20NG, ohsumed, THUCTC, CHINESE.

Training

python train.py  <dataset>

The selections of <dataset> are R8, R52, 20NG, ohsumed, THUCTC, CHINESE.

Visualization

cd visual
python tsne.py <dataset> <length>

The selections of <dataset> are R8, R52, 20NG, ohsumed, THUCTC, CHINESE.

The selections of <length> are 1, 2.

Data

R8 is provided in cleaned_data dictionary. Other datasets can be downloaded at Google drive.

Results

Accuracy

res

Embeddings

R8 embeddings in first layer:

res

R8 embeddings in second layer:

res

More images can be found at visual dictionary.

Reference

Contributors:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published