Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 930 Bytes

INFO.md

File metadata and controls

28 lines (20 loc) · 930 Bytes

aivie - Poem Generation

Instructions

  1. cd src_poem - navigate to directory.
  2. python main.py - execute code that generates 100 poems to ../generated_poems.txt

How it Works

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.

Dependencies

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.

Additional Info