AI Glossary

Text Classification

The task of assigning predefined categories or labels to text documents.

Overview

Text classification is a fundamental NLP task where a model assigns one or more predefined labels to a piece of text. Common applications include sentiment analysis, spam detection, topic categorization, intent recognition, and content moderation.

Key Details

Modern approaches use fine-tuned transformer models or leverage large language models with few-shot prompting for classification. Traditional methods include Naive Bayes, SVMs with TF-IDF features, and logistic regression. The choice of approach depends on the amount of labeled data available and latency requirements.

Related Concepts

sentiment analysisbertsupervised learning

← Back to AI Glossary

Last updated: March 5, 2026