Train a regularized logistic regression model for text classification.