midNLP

What is text classification?

Updated May 17, 2026

Short answer

Text classification assigns predefined categories to text.

Deep explanation

It uses features like TF-IDF or embeddings with ML models like Naive Bayes, SVM, or transformers to classify documents.

Real-world example

Spam detection and sentiment analysis.

Common mistakes

  • Ignoring class imbalance.

Follow-up questions

  • What metrics evaluate classification?
  • Why use embeddings instead of BoW?

More NLP interview questions

View all →