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...