NaNoGenMo / 2018

National Novel Generation Month, 2018 edition.
https://nanogenmo.github.io/
112 stars 6 forks source link

NLP Neophyte: Hivemind Seeks Glitch #64

Open danielsinderson opened 5 years ago

danielsinderson commented 5 years ago

This is my first NaNoGenMo. While playing around with a plot generator at work I got something about a hivemind trying to befriend a glitch in spacetime on a lava planet, and I've decided to run with it. I'll be generating the novel chapter by chapter using two different algorithms (hivemind vs. spacetime glitch).

-- For the hivemind, I want to create a handful of sentences to act as a scaffold for each chapter and then use them to create a lexicon and a list of sentence structures to riff off of.

-- For the spacetime glitch, I want to do some poetry generation mixed with slices of the generating code for the whole book.

Fingers crossed. So far I've mapped the "plot" out, written some of the scaffold sentences, and started playing around with spaCy and TextBlob.

As a stretch goal or plan B I've already created a simple program that creates centos. I'd like to use it to create a book length work and then (eventually) write a program that parses the sentences of it and tweaks them to make them more grammatically correct (verb tense agreement etc.).

I'm super excited. I just learned that NaNoGenMo existed a few weeks ago and I love what I've seen so far.

hugovk commented 5 years ago

Welcome to NaNoGenMo and have fun!

mathias commented 5 years ago

Sounds neat!

danielsinderson commented 5 years ago

Fell asleep while version 2 of the code was running last night and it was still running this morning; clearly, some optimization is in order... Here's the version 1 code though and a 50000+ word count novel from it! It mostly nonsensical (but sometimes poetically so?), and I only managed to finish the hivemind code in time, but this was extremely fun.

I'll continue to work on it until I get both the glitch voice and the second version of the hivemind voice working in a more timely fashion.

The code: https://github.com/scraptured/NaNoGenMo2018-Reaching-/blob/master/NaNoGenMo2018_v1.py The novel: https://github.com/scraptured/NaNoGenMo2018-Reaching-/blob/master/Reaching_v1.pdf

jeffbinder commented 5 years ago

I like this one. The text reminds me of some of the surrealists' automatic writing experiments. The sense–nonsense balance seems a bit different from what typically comes out of Markov and neural text generators. The vocabulary constraints also give it a more coherent feel.

danielsinderson commented 5 years ago

@jeffbinder Thanks! The template sentences I wrote were actually very stream-of-consciousness so maybe what you're seeing is an artifact from that? And yea, I think you're absolutely right about the vocabulary constraints. I incorporated word embedding vectors in version 2 to increase the lexicons for nouns, adjectives, and verbs but the added vocabulary just made the output seem more obviously meaningless. Looking into other ways to improve it now.