Introduction
Before training a neural network on text data and generating text using LSTM cells, it is important to understand how text data (such as words, sentences, customer reviews, or stories) is converted to word vectors first before it is fed into a neural network. This chapter will describe how to convert a text into a corpus and generate word vectors from the corpus, which makes it easy to group similar words using techniques such as Euclidean distance calculation or cosine distance calculation between different word vectors.