Train a text classifier with scikit-learn The text classifier is composed of two elements assembled in a pipeline. Instead of using fit and then predict we will use fit then transform. But in real life we face data in different forms like text images audio video etc.