concept text classification in category nlp

appears as: Text classification
Real-World Natural Language Processing

This is an excerpt from Manning's book Real-World Natural Language Processing.

Text classification is a process of classifying pieces of text into different categories. This is one of the simplest yet most widely-used NLP tasks. You might not have heard of this term “text classification” before, but I bet most, if not all, of you benefit from this NLP task every day. For example, spam filtering is one type of text classification. It classifies emails (or some other types of text, such as web pages) into two categories—spam or not spam. This is why you get very few spam emails when you use Gmail and you see so few spammy (low quality) web pages when you use Google.

Another type of text classification is called sentiment analysis. This is what you saw in Section 1.1. Sentiment analysis is used to automatically identify subjective information, such as opinions, emotions, feelings, etc. within text. One of the most basic tasks in sentiment analysis is the classification of polarity, that is, to classify whether the expressed opinion is positive, negative, or neutral. There could be more than three classes, such as: strongly positive, positive, neutral, negative, or strongly negative. This may sound familiar to you if you have used one of the websites (for example, Amazon) where people can review things such as products and movies using a 5-point scale expressed by the number of stars.

In previous chapters, we covered linear layers and RNNs, two main neural network architectures commonly used in NLP. In this chapter, we introduce another important class of neural networks called convolutional neural networks (CNNs). CNNs have very different characteristics from RNNs that make them suitable for NLP tasks where detecting linguistic patterns is important, such as text classification.