nltk 3 compatibility fix