Language model using Shakespeare data

From the preceding example, we can get the model to generate text. But the network will surprise us, as it's not only going to generate text but also it's going to learn the style and the structure in training data. We can demonstrate this interesting process by training an RNN-type model on specific kind of text that has structure and style in it, such as the following Shakespeare work. 

Let's have a look at a generated output from the trained network:

Second Senator:
They are away this miseries, produced upon my soul,
Breaking and strongly should be buried, when I perish
The earth and thoughts of many states.

In spite of the fact that the network only knows how to produce one single character at a time, it was able to generate a meaningful text and names that actually have the structure and style of Shakespeare work.

..................Content has been hidden....................

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