Passer au contenu principal

Defining text classification tasks:

Text classification is a supervised NLP task in which a text is assigned one or more labels from a predefined label set. In this playbook, we focus on four common text classification tasks: sentiment analysis, emotion analysis, hate speech analysis, and topic classification. Although these tasks can overlap in practice, they differ in what they aim to capture: sentiment focuses on polarity, emotion focuses on affective state, hate speech focuses on harmful or discriminatory language

Scope note

This chapter is designed for dataset creation and annotation. It does not cover downstream model training in detail, but the annotated outputs can later be used for classification, retrieval, moderation, or analytics pipelines.

Task distinction

Below is a short definition of the common NLP tasks (the question asks and answers). The details of each task are discussed later.

  • Sentiment analysis: Is the text positive, negative, neutral, or mixed?
  • Emotion analysis: What emotion or emotions are expressed?
  • Hate speech analysis: Does the text contain hateful, offensive, or discriminatory language, and who is targeted?
  • Topic classification: What is the main theme or domain of the text?

Text classication NLP tasks taxonomy

Define tasks

Define the annotation objective before collecting data. A dataset built for sentiment analysis should not be reused for hate speech or emotion analysis without revisiting the label schema and annotation guidelines.

Contributors
@abumafrim@Tadesse-Destaw

Join the discussion

Spotted an error, have a question, or want to share what worked on a real project? Sign in with GitHub to add your voice — every thread lives in the open, powered by GitHub Discussions.

Loading discussion…

Thanks to our Contributors

The Playbook is built by a growing community of researchers, students, and language experts. If you've contributed code, content, or review — thank you.

SUPPORTED BY

Masakhane African Languages HubBayero University, KanoBahir Dar UniversityHausaNLPEthioNLP