Introduction
Explore the fundamentals of building bidirectional LSTM models for text classification. Understand the importance of LSTM in handling sequential text data and learn to classify movie reviews as positive or negative. Gain practical skills for applying these techniques to real-world NLP problems like spam filtering and sentiment analysis.
We'll cover the following...
In this section you will be building a bidirectional LSTM for text classification. The bidirectional LSTM you build in this section will be trained on a text corpus of movie reviews, separated into positive and negative reviews.
A. Classifying text
One of the most important aspects of NLP is the task of classifying texts into different categories. Applications of text classification include spam filtering, classifying user product reviews, and automatically flagging inappropriate or harmful social media posts.
When dealing with text data it is almost always better to use an LSTM over a regular feed-forward neural network. This is because the LSTM is built specifically for sequential data like text data.
Therefore we'll use a variation known as the bidirectional LSTM for our text classification in the upcoming chapters.