Skip to content

centre-for-humanities-computing/imageability_jcls

Repository files navigation

This repository accompanies the study "Encoding Imagism? Measuring Literary Imageability, Visuality and Concreteness via Multimodal Word Embeddings."

The main directory contains three experiments, each with its own .py file.

  • In experiment_2.py, set the target file at the top of the script (Hemingway, Woolf, or the Chicago corpus).
  • functions.py provides helpers for generating embeddings and dictionary-based scores.
  • The data directory holds the textual input, precomputed embeddings (data/embeddings/), and precomputed dictionary scores (data/measures/). These can be regenerated by deleting the corresponding files and rerunning the scripts.
  • resources contains the dictionaries used in the analyses.
  • figs and results are populated automatically when the experiments are executed.

Computing Requirements (Experiment 2)

  • Runs comfortably on CPU only; on an Apple M3 (16GB RAM) it completes in a few minutes.
  • No GPU needed — all CLIP embeddings are precomputed and loaded directly.
  • Requires Python 3.9+ and standard scientific libraries:
    numpy, pandas, matplotlib, seaborn, scipy, scikit-learn, spacy, torch, transformers
  • Install the spaCy model:
    python -m spacy download en_core_web_sm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages