The Automatic Poem Generator is a NLP based project that can create poems based on a query given by a user. There are 6 different models that are trained for 6 different topics. The framework chunks the input and assigns POS tags from which we find 'Key Words'. These Keywords are used to analyze what category the poem should fall under using WordNet similarity. We then use WordNet to find words similar to the seed words that form the key aspect of the generation. The better the Seed Words, the better the poem. We generate 4 lines of poem with each line consisting of 6 words.
- Three notebooks are provided in this repository.
- The Data Processing notebook takes a publicly available dataset, Poems Dataset (NLP) and processes it into multiple datasets based on categories. (This step can be skipped as the datasets are available in this repo and on Kaggle)
- The Model Training notebook was used to train 6 different models for each topic. We ran it for around 50 epochs each, which took us between 1-3 hours. The models links are available in this repository.
- The Final Model is where everything comes together. All the below mentioned datasets and models must be added as input data. The notebook can be run. When prompted, enter the kind of poem expected. Within a few mins, a poem will be generated for you!
Original Dataset Link: https://www.kaggle.com/datasets/michaelarman/poemsdataset
Links of Datasets to be used in this project:
- Emotions Datset: https://www.kaggle.com/datasets/atulkrishnan25/emotions
- Virtues Dataset: https://www.kaggle.com/datasets/atulkrishnan25/virtues
- Fantasy and Nature Dataset: https://www.kaggle.com/datasets/harshhardikar/nature
- Seasons Dataset: https://www.kaggle.com/datasets/gayatriprabhala/seasons
- Other Topics Dataset: https://www.kaggle.com/datasets/gayatriprabhala/othertopics
Models used in the Dataset
- Emotions Model: https://www.kaggle.com/datasets/atulkrishnan25/emotions-model
- Virtues Model: https://www.kaggle.com/datasets/atulkrishnan25/virtues-model
- Nature Model: https://www.kaggle.com/datasets/harshhardikar/nature-model
- Fantasy Model: https://www.kaggle.com/datasets/harshhardikar/fantasy-model
- Seasons Model: https://www.kaggle.com/datasets/gayatriprabhala/seasons-nlp
- Other Topics Model: https://www.kaggle.com/datasets/gayatriprabhala/othertopics-model