cd src_poem
- navigate to directory.python main.py
- execute code that generates 100 poems to../generated_poems.txt
For aivie, poems were generated by taking various parts of speech structures and randomly assigning words to each part of speech. So, for example, this parts of speech structure:
ADJ NOUN | VERB ADVERB | PREPO ARTICLE NOUN
could generate the poem:
deft wind
crawls vainly
beyond the smoke
With more complex parts of speech structures and a large vocabulary, many unique, coherent poems can be generated.
The major libraries used in the poem generation aspect of aivie are pattern
, nltk
, and inflect
. These libraries were used to help in conjugating verbs so that poems would be grammatically correct.