Cross validation for text data