Every town, every mountain, and every quiet river had its own poem waiting to be discovered.
Meet MultiVerse - an interactive map where a single click anywhere in the world generates a unique poem inspired by that location. From the bustling streets of Tokyo to the silent hills of the Scottish Highlands, MultiVerse lets you explore not just geography, but language, emotion, and imagination.
Why?
✨ How It Works
MultiVerse blends real-world location data with a language engine to craft poetry that changes as you roam the map. Under the hood are two main drivers:
1. Overpass API: Finding the Soul of a Place
When you click on the map, MultiVerse needs to know where you are. That’s where the Overpass API comes in.
-
Overpass is a query engine for OpenStreetMap (OSM) data.
-
When you click the map, MultiVerse sends a request asking: “What’s the nearest town, village, or city to this point?”
-
The API responds with details about the location, such as its name.
This means that every poem is tied to a real place. If there’s an OSM record, MultiVerse can find it.
2. RiTa.js: The Language Engine
Once MultiVerse knows where you clicked, it turns that location into verse using RiTa.js, a JavaScript library for generative language.
-
RiTa uses grammars - sets of rules that describe how words can combine.
-
MultiVerse feeds the location name into a grammar and then generates a short poem.
-
The result might look something like:
Winter gentle breeze Wakes softly in Kyoto’s streets Fading with the dusk
Because the grammar is flexible and randomized, each poem is (largely) unique - and each town can have hundreds of possible variations, each offering a new way of seeing the place.
I say “(largely) unique” because MultiVerse uses a set of rules that randomly combine adjectives, verbs, and nouns. At the moment, my MultiVerse grammar (set of rules) and vocabulary (word dictionary) are quite limited, so you will probably notice some repetition in the poems it generates. However, the beauty of RiTa.js is that you can easily expand the grammar rules and the vocabulary data. With a larger vocabulary and a more complex grammar, the chances of spotting repetitive patterns would drop dramatically.
No comments:
Post a Comment