Train a random forest classifier for text classification.