Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/merveenoyan/ml-poetry
Poetry classification with RNN and decision trees.
https://github.com/merveenoyan/ml-poetry
Last synced: 17 days ago
JSON representation
Poetry classification with RNN and decision trees.
- Host: GitHub
- URL: https://github.com/merveenoyan/ml-poetry
- Owner: merveenoyan
- Created: 2020-05-28T16:07:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T10:02:30.000Z (almost 2 years ago)
- Last Synced: 2024-10-20T05:33:18.607Z (26 days ago)
- Language: Jupyter Notebook
- Size: 371 KB
- Stars: 31
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Poetry Classification Notebook
![Poetry Classification Header](https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/05df8cc2-4413-4a7c-93c7-dbf7991b18a7/ddxz5h4-a844ba43-c2fe-4cf5-a54b-7b0b106a0edc.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3sicGF0aCI6IlwvZlwvMDVkZjhjYzItNDQxMy00YTdjLTkzYzctZGJmNzk5MWIxOGE3XC9kZHh6NWg0LWE4NDRiYTQzLWMyZmUtNGNmNS1hNTRiLTdiMGIxMDZhMGVkYy5wbmcifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6ZmlsZS5kb3dubG9hZCJdfQ.-VnjZYfWlvW4BkECBqug2QCGpK7hwvPccE8GESLzxtU)
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](https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/05df8cc2-4413-4a7c-93c7-dbf7991b18a7/ddxyf2e-20784a4b-c60d-45c6-8fe1-4a281665d670.png/v1/fill/w_1280,h_487,q_80,strp/vs_by_markdownimgmn_ddxyf2e-fullview.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3siaGVpZ2h0IjoiPD00ODciLCJwYXRoIjoiXC9mXC8wNWRmOGNjMi00NDEzLTRhN2MtOTNjNy1kYmY3OTkxYjE4YTdcL2RkeHlmMmUtMjA3ODRhNGItYzYwZC00NWM2LThmZTEtNGEyODE2NjVkNjcwLnBuZyIsIndpZHRoIjoiPD0xMjgwIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmltYWdlLm9wZXJhdGlvbnMiXX0.3K_JTqac7uTpP6dZCKybJxUrQitNVPk3x9p-Zqeyz_Y)
# Files
- *all.csv* including data taken from [kaggle](https://www.kaggle.com/ishnoor/poetry-analysis-with-machine-learning?select=all.csv)
- *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
- **Merve Noyan** - [merveenoyan](https://github.com/merveenoyan)
## 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](https://stackedit.io/).