Text classification assigns a category to a document: sentiment, topic, spam, intent. A classic approach chains a vectorizer (TF-IDF) and a linear classifier in a pipeline; modern approaches fine-tune a language model. Evaluation accounts for class imbalance.
Example
make_pipeline(TfidfVectorizer(), LogisticRegression())