zombie-einstein / attention_network

Hierachical attention network for text classification/sentiment analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hierarchical Attention Network

Attention network for text data, combining word and sentence level attention.

Network structure adapted from https://github.com/richliao/textClassifier

Also has the ability to extract attention features: attention plot

attention plot

Structure

  • usage.ipynb: Usage example, also with plotting utilities
  • attention_layer.py: Attention layer module for Keras
  • heirachical_attention_network.py: Network module

Requirements

  • Glove embeddings
  • Tensorflow 2.0

About

Hierachical attention network for text classification/sentiment analysis


Languages

Language:Jupyter Notebook 98.3%Language:Python 1.7%