In this chapter, we started by developing deep neural networks for text classification. Due to the unique characteristics of text data, several extra preprocessing steps are required before a deep neural network sentiment classification model can be developed. We used a small sample of five tweets to go over the preprocessing steps, including tokenization, converting text data into a sequence of integers, and padding/truncation to arrive at the same sequence length. We also highlighted that automatically labeling text sequences with the appropriate sentiment is a challenging problem and general lexicons may be unable to provide useful results.
To develop a deep network sentiment classification model, we switched to a larger and ready-to-use IMDb movie review dataset that's available as part of Keras. To optimize the model's performance, we also experimented with...