NaNoGenMo / 2019

National Novel Generation Month, 2019 edition.
97 stars 5 forks source link

PlotGEN - Unsupervised learning of plots #48

Open theairdemon opened 4 years ago

theairdemon commented 4 years ago

Hello all! I am very excited to be joining NaNoGenMo this year. I'm currently in a Writing with Algorithms class at my college, and some of our readings have been past submissions on NaNoGenMo. Lots of really cool projects in the previous years, I'm looking forward to seeing what everyone does this time!

My repo is located here: https://github.com/theairdemon/PlotGEN

The idea is more detailed in my README.md, but to summarize: I want to analyze a number of texts, store information about the plot and the world within an m by n matrix, and cluster the texts according to a straightforward clustering model. This would allow me to generate plotlines within the parameters of the n-dimensional matrix and group them with their closest neighboring clusters.

Thanks for your time, best of luck with your projects! -Hunter

jdm commented 4 years ago

The url text is correct, but the actual url links to the wrong repo.

theairdemon commented 4 years ago

Thanks for the note, I think I fixed it!

theairdemon commented 4 years ago

Updated repo! You can now visualize the structure of plots, based off the article I've included in the ReadMe. My initial comparison is between Lovecraft's The Call of Cthulhu and Jane Austen's Emma. The difference between these two plots is remarkable! Emma contains mostly positive sentiments, and sporadically dips below the x-axis (indicating a few negative paragraphs), before coming back into the positive range. By contrast, The Call of Cthulhu is almost entirely negative, except for a part in the middle (around Chapter 3), when the plot lightens up for a bit before plunging back into darkness.

My next step is fitting some kind of Linear Regression model, followed by then generating my own plotlines and pulling them towards the line of closest fit.

theairdemon commented 4 years ago

I figure some people might not want to clone the repo, and to run it, you need a decent number of libraries installed. Here's a few of the "plot-lines" I generated.

Call of Cthulhu by Lovecraft image

Emma by Jane Austen image

Call of Cthulhu vs. Emma image

theairdemon commented 4 years ago

Plots are smoother, and they now have a standard x-axis ranging from 0 to 100. There is also a function for getting the peaks and valleys of the plotline and turning it into an array of words.

Call of Cthulhu image Plotline description: ['bad', 'bad', 'most bad', 'bad', 'bad', 'a little good', 'a little good', 'a little good', 'bad', 'bad', 'very bad', 'very bad']

I also started generating my own plotlines based off other plots. In blue is our favorite plotline, Call of Cthulhu, and the black line is my noise-generated plotline: image Generated Plotline description: ['kinda bad', 'bad', 'bad', 'bad', 'a little good', 'a little good', 'a little good', 'kinda bad', 'kinda bad', 'most bad', 'very bad']

Next step is to take the description and build a series of sentences describing events happening, to make a short 1 paragraph summary of the plot.