After starting the program you will be greeted with the main menu. You will want to choose "Train Poe" to train Poe a text. You can then choose which text you would like to train Poe. There are a couple texts to choose from by default, but if you would like to train him using something else, simply just upload a .txt file of it into the texts folder. It will automatically show up in the list of available texts. You may also train it using multiple texts. Just train Poe one, then the next. He will remember both.
After you are finished training Poe, you will want to return to the main menu. Then choose to either generate a sonnet or haiku. After that, you will be prompted to enter the poem's topic. This can be anything as long as it is only one word. It works better to select a topic that relates to texts Poe wrote about.
Poe will then attempt to create a sonnet about the topic you chose. It usually will take him 10-20 seconds to do this, but it can sometimes take longer. The poem will be displayed on your screen as well as saved to poems.txt.
Poe will remember what you trained him after you generate a poem, so you can generate more poems without retraining him. If you want to train Poe using a different text, just choose the reset option and retrain him.
I recommend trying to train Poe using a variety of texts. You can get some pretty funny poems by doing that.
Example Poems
Sonnet about love: (Trained by a collection of Edgar Allen Poe's writing) https://storage.googleapis.com/replit/images/1549558685988_474769d67c54cb9534fc7a8514557564.pn
Sonnet about religion: (trained by The Bible): https://storage.googleapis.com/replit/images/1549558609422_b2fc2fc67012f0d1847557a29efb7d25.pn
Haiku about love (trained by the Timecube) https://storage.googleapis.com/replit/images/1549559132925_2d9cc70bc49c365e52f1722e8fa99a75.pn
How it works
Poe creates sonnets by reading a large text and learning what words are commonly used alongside other words. The text that Poe is trained off of is "input.txt". He also uses the Datamuse API to find the syllables of a word as well as find which words rhyme with each other. Each time the Datamuse API is called, he parses and saves the response. This helps reduce the required API calls to create a sonnet which makes him faster as time goes on.
Planned Updates (in no particular order)
Train Poe from a web domain
Limerick creation
Improved stats
Improved code documentation
Bug fixes (primarily the line skip bug)
Update Log
Monday, February 4th - Poe first released
Wednesday, February 6th - Major UI overhaul, added support for training of multiple text files
Thursday, February 7th - Added support for Haikus
Known Issues
Sometimes Poe will fail to generate a single line and omit it from the sonnet. This will result in a blank line being printed where the line of poetry would've been. I'm working on finding the cause/solution.
This is one of my first large programming projects and I worked really hard on it. I appreciate any suggestion's/upvotes. :)
Make out from him with us with the broadway
A man and for many analogous
Found it did not long and every day
Will be found it for all analysis
Let him from which were here analogy
In that at first portion of me to fan
To and of illustrious family
Him with him and could not what means of man
And was far as a hundred and surname
I was an old man and his wicked jokes
Was she was that of us and with a game
For a long and that after all but hoax
With it did not say that all at random
It and appeared to a memorandum
One suggestion though is add some kind of exception for when it can't generate a poem based on the subject, because at the moment it gives you a error.
📃 Poe - The Autonomous Poet (Major UI Update/Can now write Haikus)
How to use
https://storage.googleapis.com/replit/images/1549557288272_e87fdfa4801fd4c1214c8eddccf9d0d2.pn
After starting the program you will be greeted with the main menu. You will want to choose "Train Poe" to train Poe a text. You can then choose which text you would like to train Poe. There are a couple texts to choose from by default, but if you would like to train him using something else, simply just upload a .txt file of it into the texts folder. It will automatically show up in the list of available texts. You may also train it using multiple texts. Just train Poe one, then the next. He will remember both.
After you are finished training Poe, you will want to return to the main menu. Then choose to either generate a sonnet or haiku. After that, you will be prompted to enter the poem's topic. This can be anything as long as it is only one word. It works better to select a topic that relates to texts Poe wrote about.
Poe will then attempt to create a sonnet about the topic you chose. It usually will take him 10-20 seconds to do this, but it can sometimes take longer. The poem will be displayed on your screen as well as saved to poems.txt.
Poe will remember what you trained him after you generate a poem, so you can generate more poems without retraining him. If you want to train Poe using a different text, just choose the reset option and retrain him.
I recommend trying to train Poe using a variety of texts. You can get some pretty funny poems by doing that.
Example Poems
Sonnet about love: (Trained by a collection of Edgar Allen Poe's writing)
https://storage.googleapis.com/replit/images/1549558685988_474769d67c54cb9534fc7a8514557564.pn
Sonnet about religion: (trained by The Bible):
https://storage.googleapis.com/replit/images/1549558609422_b2fc2fc67012f0d1847557a29efb7d25.pn
Haiku about love (trained by the Timecube)
https://storage.googleapis.com/replit/images/1549559132925_2d9cc70bc49c365e52f1722e8fa99a75.pn
How it works
Poe creates sonnets by reading a large text and learning what words are commonly used alongside other words. The text that Poe is trained off of is "input.txt". He also uses the Datamuse API to find the syllables of a word as well as find which words rhyme with each other. Each time the Datamuse API is called, he parses and saves the response. This helps reduce the required API calls to create a sonnet which makes him faster as time goes on.
Planned Updates (in no particular order)
Update Log
Known Issues
Sometimes Poe will fail to generate a single line and omit it from the sonnet. This will result in a blank line being printed where the line of poetry would've been. I'm working on finding the cause/solution.
This is one of my first large programming projects and I worked really hard on it. I appreciate any suggestion's/upvotes. :)
A poem about memes.... uh... okay.
Great program, by the way!
One suggestion though is add some kind of exception for when it can't generate a poem based on the subject, because at the moment it gives you a error.
@Zavexeon thanks for the suggestion I'll add that tonight.
EDIT: This problem has been resolved I think.