Plot of the attention in a HAN (Hierarchical Attention Networks).
The blue 🔵 shades on the left represent sentence-level attention, and the red 🔴 shades represent word-level attention.
This repository contains already parsed data from a model trained on 644 news articles to dinstiguish Hyperpartisan and Mainstream media (by-article-train_attn-data.json
).
You can supply your own data as long as it follows the expected format (see here).
index.html
was heavily based on this open-source repo.
-
Serve the index.html file with an HTTP server.
python3 -m http.server 8080
-
Navigate to
localhost:8080
-
Select and load the
by-article-train_attn-data.json
file. -
Choose the index of one of the loaded articles on the top-left text input (there are 644 articles in the provided data file).
-
Click "Run", and repeat from step 4 for different articles.