Skip to content

bond-lab/chainnet-viz

Repository files navigation

ChainNet-Viz

A web application to visualize metaphors and metonyms from ChainNet, with pictogram illustrations from ARASAAC.

Live demo: https://bond-lab.github.io/chainnet-viz/

Overview

ChainNet-Viz provides an interactive visualization of semantic relationships (metaphors and metonyms) between word senses. It uses:

  • ChainNet - A database of regular polysemy patterns in English
  • Open English WordNet - For sense definitions and relationships (via en-word.net API)
  • ARASAAC - Pictograms to illustrate word senses

Setup

For GitHub Pages (Static Version)

The docs/ folder contains a static version that runs entirely in the browser:

# Clone ChainNet data
mkdir -p etc
git clone https://github.com/rowanhm/ChainNet.git etc/ChainNet

# Build static JSON files
python3 scripts/build_static.py

Then enable GitHub Pages in your repository settings, pointing to the docs/ folder.

Local Development

To test locally:

cd docs
python3 -m http.server 8000

Then visit http://localhost:8000/

Project Structure

chainnet-viz/
├── docs/                   # Static site for GitHub Pages
│   ├── index.html          # Home page
│   ├── chainnet.html       # Visualizer page
│   ├── data/
│   │   ├── chainnet.json   # ChainNet metaphor/metonymy data
│   │   └── araasac-ili.json # ARASAAC pictogram mappings
│   ├── js/
│   │   ├── graph.js        # D3.js visualization
│   │   └── helpers.js      # Utility functions
│   └── css/
├── etc/                    # External data (gitignored)
│   └── ChainNet/           # ChainNet repository
├── scripts/
│   └── build_static.py     # Build static JSON files
└── README.md

API Endpoints (en-word.net)

The static version calls the Open English WordNet API:

  • https://en-word.net/json/lemma/{word} - Get all synsets for a lemma
  • https://en-word.net/json/ili/{ili} - Get synset by ILI

Data Sources

  • ChainNet: Hall Maudslay, R., Pimentel, T., Cotterell, R., & Teufel, S. (2024). ChainNet: Structured Metaphor and Metonymy in WordNet.
  • Open English WordNet: McCrae, J. P., Fellbaum, C., & Cimiano, P. (2017). Publishing and Linking WordNet using lemon and RDF.
  • ARASAAC: Pictograms by Sergio Palao, licensed under CC BY-NC-SA 4.0.

Flask Version

A Flask-based version with a Python backend is available on the flask-version branch.

License

MIT License. See data sources above for their respective licenses.

About

A site to visualize lexicalized metaphors in English, using ChainNet and Wordnet

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors