2018 icon indicating copy to clipboard operation
2018 copied to clipboard

NLP Neophyte: Hivemind Seeks Glitch

Open danielsinderson opened this issue 5 years ago • 5 comments

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.

danielsinderson avatar Nov 10 '18 08:11 danielsinderson

Welcome to NaNoGenMo and have fun!

hugovk avatar Nov 10 '18 11:11 hugovk

Sounds neat!

mathias avatar Nov 12 '18 16:11 mathias

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

danielsinderson avatar Dec 01 '18 15:12 danielsinderson

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.

jeffbinder avatar Dec 02 '18 15:12 jeffbinder

@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.

danielsinderson avatar Dec 04 '18 22:12 danielsinderson