How it works...

When a new unknown or forgotten work of art is about to be attributed to an author, there are eminent academics who compare this work with other pieces of work attributed to the author. What the academics do is to find common patterns in the text sequence of the well-known works, hoping to find similar patterns in the unknown work.

This recipe works in a similar way: an RNN learns what the most peculiar patterns in Shakespeare's writing are and then these patterns are used to generate new, never-seen-before texts which well represent the style of the greatest English author.

Let's see a few examples of execution:

python shakespeare.py
Loading previous char_idx
Vectorizing text...
Text total length: 4,573,338
Distinct chars : 67
Total sequences : 1,524,438
---------------------------------
Run id: shakespeare
Log directory: /tmp/tflearn_logs/
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset