ML-poetry icon indicating copy to clipboard operation
ML-poetry copied to clipboard

Poetry classification with RNN and decision trees.

Poetry Classification Notebook

Poetry Classification Header This notebook includes classification of poetry ages and authors with both RNNs and decision trees (because the size of data is too small).

Models and Data Used

  • Data: Poetry from various poets such as William Shakespeare, different genres and different ages.
  • Classification Methods: Decision Trees (sklearn) and RNNs (tf.keras)

Decision Trees vs NN

Files

  • all.csv including data taken from kaggle
  • poetry-nlp-notebook.ipynb Interactive Python Notebook that includes the code itself

Libraries Used

nltk
re
keras
seaborn
matplotlib
scikit-learn
pandas
tensorflow
numpy
wordcloud
ps: All the libraries can be downloaded by pip install -r requirements.txt

Author

Further Notes

Will migrate this project to tensorflow and generate poetry, stay tuned and watch this repo if you don't want to miss 🤓

Written with StackEdit.