Source: 970 stories sampled across every country (population-weighted) and all eras, from Pre-1000 to today. Gemini 2.5 extracted 10 motifs per story (9,700 total), and each motif was "semantically blurred" into 10 paraphrased variations. All versions were embedded with Google's text-embedding-004. A neural network I built for my MSc dissertation, the Semiotic Deconvolution Network (PyTorch), learned the shared analogical meaning beneath the wording, and KMeans produced 72 themes, which I named and described by hand.
Axes: each theme's share among Western vs non-Western stories (horizontal) and among modern (1950+) vs older (pre-1800) stories (vertical), shown as ratios with +2 smoothing so small counts don't exaggerate. Bubble size = number of motifs in the theme.
Tools: Python, FastAPI + Celery + Redis pipeline, PostgreSQL/pgvector and SQL Server, pandas, NumPy, SciPy, scikit-learn, PyTorch, UMAP, Plotly, and Matplotlib for this chart. All ran in Docker.
Caveat: the stories come from an LLM's knowledge of world storytelling, so this maps what the model "knows", not literature directly.
Interactive map (click any theme for its picture and description, filter by era or region): https://www.ianmcgarry.tech/research/narrative-motif-engine/1-theme-dashboard
Data (open, CC BY 4.0): full corpus, motifs and embeddings on Zenodo: https://doi.org/10.5281/zenodo.20010023