Using the model

Finally when the model has been created we can run it. This we do using the file run_model.py. First we can run the model using the text it is created on, as seed.

Line breaks

These are quite important in poetry. And I'm not being ironic here. Some put them sentence wise. Some put them in order to align words that rime. Some put them to make the reading of the poem a bit clunky. However we just put them randomly with a length of minimum 3 words and maximum 7 words. This is done using the create_linebreaks function. So the first poem by Alice Botta is

dormouse say with some difficulty and the cook was leaning over the fire licking her paws and washing it nobody replied in a voice tone and began picking them at the mouses tail i wonder what curled at the melancholy

However let's try using some other seed text. I have found some other texts located in the txt folder. Let's try using some Poe. First we need to create sequences of poe.txt. So run create_seqs with length 40 and poe.txt as input. Again run_model but with the seed parameter set to what we have saved the poe sequences as. And we get:

dormouse and the moral of the trials change and fork in the wind and the jury sitting on a tree a little girl but i shant be able i am i to get them off from being pinched in the

This is actually quite interesting!

Feel free to mess around and do your thing. I know I will. You can look in the writings section for my results. I might extend author wise.

Share