How to create a poet / writer using Deep Learning (Text Generation using Python)?
Introduction
From short stories to writing 50,000 word novels, machines are churning out words like never before. There are tons of examples available on the web where developers have used machine learning to write pieces of text, and the results range from the absurd to delightfully funny.
Thanks to major advancements in the field of Natural Language Processing (NLP), machines are able to understand the context and spin up tales all by themselves.
Examples of text generation include machines writing entire chapters of popular novels like Game of Thrones and Harry Potter, with varying degrees of success.
In this article, we will use python and the concept of text generation to build a machine learning model that can write sonnets in the style of William Shakespeare.
Let’s get into it!
Table of Contents
- What are text generators?
- The different steps of Text Generation
- Importing Dependencies
- Loading the Data
- Creating Character/Word mappings
- Data Preprocessing
- Modelling