xuming76 / HAN-text-classification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HAN-text-classification

This code belongs to the "Implementation of Hierarchical Attention Networks for Document Classification" .

Structure:

  • embedding

  • Word Encoder: word level bi-directional GRU to get rich representation of words

  • Word Attention:word level attention to get important information in a sentence

  • Sentence Encoder: sentence level bi-directional GRU to get rich representation of sentences

  • Sentence Attetion: sentence level attention to get important sentence among sentences

  • FC+Softmax

Requirement:

  • Python 2.7
  • Tensorflow 1.1 +
  • numpy

Notes:

Please load the dataset in this address. And add the dataset to data folder.

Hava a good time!

About


Languages

Language:Python 100.0%