Text Generation with Python and TensorFlow/Keras
Introduction
Are you interested in using a neural network to generate text? TensorFlow and Keras can be used for some amazing applications of natural language processing techniques, including the generation of text.
In this tutorial, we’ll cover the theory behind text generation using a Recurrent Neural Networks, specifically a Long Short-Term Memory Network, implement this network in Python, and use it to generate some text.
Defining Terms
To begin with, let’s start by defining our terms. It may prove difficult to understand why certain lines of code are being executed unless you have a decent understanding of the concepts that are being brought together.
TensorFlow
TensorFlow is one of the most commonly used machine learning libraries in Python, specializing in the creation of deep neural networks. Deep neural networks excel at tasks like image recognition and recognizing patterns in speech. TensorFlow was designed by Google Brain, and its power lies in its ability to join together many different processing nodes.
Keras
Meanwhile, Keras is an application programming interface or API. Keras makes use of TensorFlow’s functions and abilities, but it streamlines the implementation of TensorFlow functions, making building a