TV Script Generation

Creation of a neural network to generate a Simpsons script.

AI RNN Natural Language Processing (NLP) LSTM Tensorflow


The aim of this project was to work with Natural Language Processing (NLP)

To practise with NLP I created a neural network that was able to generate a new Simpson's episode script.

The network created was a Recurrent Neural Network (RNN) with Long Short.term Memory (LSTM) cells.


This was my third project of the Deep Learning Nanodegree and the first one about NLP. The aim was that we got to understant RNN and the implementation of LSTM using tensorflow.


After some training the network was able to produce plausible text. The generated text is correctly structured as a conversation where there is a person speaking and the sentence has all punctuation needed.

The only problem is that the script lacks coherence between sentences.

Here you can see a sample of the generated text:

moe_szyslak:(tough) homer, the mob is puttin' the screws on me, see...
lisa_simpson: we can get a dad."
marge_simpson: you're a little more" milk of amnesia."
moe_szyslak: c'mon, homer. you're a remote."
homer_simpson: i read in that real with your money me back...
moe_szyslak: hey, this is a knife that's song for the house.
moe_szyslak:(embarrassed) we should be dead!
moe_szyslak:(excited) my campaign is a lot of two too thing.

moe_szyslak:(stunned) oh, my car! thank you!
moe_szyslak:(proudly) i told you, when i get a rough day.
moe_szyslak:(impressed) no, okay, boxing.
moe_szyslak:(to moe, gasps) i don't know if you don't know...
seymour_skinner:(quickly) man, look, i haven't seen the best book you've ever been in the world.
moe_szyslak: hey, hey, that's what you...

More Projects

More Projects