Irish ghost and fairy stories from two public-domain books, put back on the map.
- Jeremiah Curtin's Tales of the Fairies and of the Ghost World (1895): 30 tales told to him by firesides in south-west Munster.
- St John D. Seymour and Harry L. Neligan's True Irish Ghost Stories (1914): ghost accounts sent in from all over Ireland.
An open-weight model (Gemma 4) reads each story: what haunts it, a one-line summary, and which places it names. Plain code then checks every answer before anything is pinned on the map.
Gemma reads. Code decides.
- Every place must come with an exact quote, and the quote must be in the story.
- The name must be a real place on the island of Ireland: a Tailte Éireann or OSNI townland, or a GeoNames town, hill, lake or bridge.
- Curtin spelled names as he heard them (Lochlein, Rahonain). Gemma may suggest a modern spelling, but code accepts it only if that place exists and lies near the tale's other places.
- When several real places share a name, code picks the one nearest the story's other places, or in the county the story names. If nothing in the story can decide, the place is not pinned.
- Counties and provinces are listed, not pinned. Everything refused is shown, with the reason.
- The 1914 book runs its stories together with no headings. Gemma says which paragraph each account starts at; code checks the numbers and cuts the text. Gemma never rewrites the text.
python -m venv .venv && .venv/Scripts/pip install pyproj shapely
# put GEMINI_API_KEY=... in .env (Google AI Studio key)
python scripts/split_tales.py # Curtin -> data/tales.json (ids 1-30)
python scripts/split_seymour.py # Seymour & Neligan -> data/tales.json (ids 101+), Gemma marks story starts
python scripts/add_passages.py # haunted-site passages from data/sites.json -> data/tales.json (ids 301+)
python scripts/build_gazetteer.py # townlands + GeoNames -> data/gazetteer.json, web/data/counties.geojson
python scripts/extract.py # Gemma 4 26B -> data/extract/NN.json (cached, resumable)
python scripts/verify.py # checks -> web/data/tales.json, web/data/places.geojson
python scripts/respell.py && python scripts/verify.py # modern spellings for old names, then re-check
python scripts/site_images.py # freely licensed Commons images of the sites, with credits -> data/site_images.json
python scripts/sites.py # famous haunted sites: quote must be in the story -> web/data/sites.json
python scripts/narrate.py # ElevenLabs narration for chosen stories -> web/audio/, needs ELEVENLABS_API_KEY in .env
python scripts/eval.py # against data/labels.json
python -m http.server 8765 --directory webRaw inputs (not committed) go in data/raw/:
curtin_1895.txt: https://archive.org/download/cu31924029910563/cu31924029910563_djvu.txtseymour_1914.txt: https://www.gutenberg.org/cache/epub/14099/pg14099.txtcroker_1825.txt: https://www.gutenberg.org/cache/epub/39752/pg39752.txtmcanally_1888.txt: https://www.gutenberg.org/cache/epub/19486/pg19486.txttownlands_20m.geojson: Townland Boundaries Generalised 20m (Tailte Éireann, data.gov.ie)osni_townlands.geojson,osni_counties.geojson: OSNI Open Data townland and county boundaries (ArcGIS Hub), as WGS84 GeoJSONgeonames_IE/IE.txt: https://download.geonames.org/export/dump/IE.zipgeonames_GB/GB.txt: https://download.geonames.org/export/dump/GB.zip (only Northern Ireland rows are used)
- Tales: Jeremiah Curtin (1895), public domain. Scan: Cornell University Library via archive.org.
- Stories: St John D. Seymour and Harry L. Neligan (1914), public domain. Text: Project Gutenberg #14099.
- Haunted sites: also T. Crofton Croker (1825, Gutenberg #39752) and D. R. McAnally (1888, Gutenberg #19486), public domain. Two site locations (Charles Fort, Dunseverick Castle) are Wikipedia coordinates; the rest come from GeoNames.
- Townland boundaries: © Tailte Éireann, CC BY 4.0. Northern Ireland: OSNI Open Data, Open Government Licence v3.
- Place names: GeoNames, CC BY 4.0.
- Site images: Wikimedia Commons, CC BY-SA; each is credited (author, licence, file page) on its site page and in
data/site_images.json. - Narration: ElevenLabs text to speech ("George" voice), reading the books' own text.
- Map tiles: © OpenStreetMap contributors.
- Model: Gemma 4 (open weights), called through Google AI Studio.
- Code: MIT.