Robin Camille Davis
  1. Home /
  2. Blog /
  3. NaNoGenMo project: Book of Horoscopes

NaNoGenMo project: Book of Horoscopes

January 20, 2020
Tags: words, nanogenmo

Every November, I get excited for NaNoGenMo — National Novel Generation Month, which challenges you to write code that generates a 50,000-word novel (we’re using novel loosely here). Your output doesn’t have to make sense and it probably won’t. It’s a great way to practice your code skills for a creative and silly project that over 100 other people participate in on GitHub.

For NaNoGenMo 2019, I created the Book of Horoscopes (see my code on GitHub). Using a list of existing horoscopes and fortunes from other sources, a list of interjections, and Markov chains, my Python script generates a year of daily horoscopes for each Zodiac sign.

The general format, inspired by Cosmopolitan magazine’s horoscopes, is: date, sign, exclamation (“Yikes, Leo!”), then a mangled horoscope:

Friday, January 31, 2020
Aquarius
Agreed, Aquarius! Heaven knows it’s little enough. Good news will come true. Many changes of mind helps in decision making. Compassion is very much a part of your nature. Drain the moat. An exotic journey in downtown newark is in the business world and society. You will attract cultured artistic.

This was a fun project. I love iterative language generation projects with no attempt at narrative, the kind you won’t read straight through but will dive into here and there.

I had one output of my script printed and bound into a 501-page book, without any editing besides formatting:

Thick book titled Book of Horoscopes 2020: Generated for All Signs

Interior of large book with horoscope texts

You can read the whole 501-page output of my script as a PDF (7.5MB, starts on page 5).

Like many Markov chain text experiments, sometimes the output of this project makes an uncanny amount of sense, and sometimes it totally doesn’t. I also left it a little messy, so capitalization and punctuation are a bit off.

I should also note that absolutely zero astrological knowledge went into the creation of this script. No star alignments were calculated, and I still don’t know what “house” means in astrology. This project is meant to be whimsical but not mean-spirited. I won’t lie, I had just read the New Yorker essay about astrology by Christine Smallwood when I started brainstorming project ideas.

My previous NaNoGenMo projects: