Improved NLTK classification of past output