Understanding topic classification
We saw a small example of topic classification in Chapter 5, Text Classification and Regression Using AutoKeras, with the example of the spam classifier. In that case, we predicted a category (spam/no spam) from the content of an email. In this section, we will use a similar text classifier to categorize each article in its corresponding topic. By doing this, we will obtain a model that determines which topics (categories) correspond to each news item.
For example, let's say our model has input the following title:
"The match could not be played due to the eruption of a tornado"
This will output the weather
and sports
topics, as shown in the following diagram:
The previous diagram shows a simplified version of a topic classifier pipeline. The raw text is processed by the classifier and the output will be one or more categories.
Later in...