Text Classification Using LSTM

Text classification is the task of tagging natural language texts or unstructured text to one of the categories from a predefined set. Identifying positive-negative sentiments in product reviews, categorizing news articles, and segmenting customers based on their conversations about products in social media are some of the applications of text classification. One real-world example is automatic spam detection using machine learning (ML) in Gmail. The main goal of this chapter is to make the reader understand and get familiar with hands-on deep learning approaches for text classification.

In the previous chapters (Chapter 2, Text Classification and POS Tagging Using NLTK), we briefly touched upon text classification using classic ML approaches using a bag-of-words models with NLTK and sklearn. In this chapter, we will dive deeper into classifying text using deep learning methods. The focus of this chapter will be mainly on using recurrent neural networks (RNNs), such as Long Short-Term Memory (LSTM), and Gated Recurrent Units (GRUs) for text classification. However, we will also cover Convolutional Neural Networks (CNNs) for completeness. To address the breadth of this topic, we will also touch upon a related unsupervised learning method called topic modeling. To summarize, the following will be the main topics covered in this chapter:

  • Topic modeling
  • Using CNNs to classify text
  • RNNs for text classification
  • Text classification with transfer learning
  • A brief summary of state-of-the-art deep learning approaches to text classification
..................Content has been hidden....................

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