Simple practice for text classification using Python