Summary

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 parameters such as the maximum sequence length at the time of data preparation, as well as the type of optimizer that's used for compiling the model. These experiments yielded decent results; however, we will continue to explore this data so that we can improve the model's sentiment classification performance on the deep network model even further.

In the next chapter, we will make use of the recurrent neural network classification model, which is better suited to working with data involving sequences.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset