porter=nltk.PorterStemmer() lancaster=nltk.LancasterStemmer() [porter.stem(t) for t in tokens] [lancaster.stem(t) for t in tokens]
#WordNet词形归并器删除词缀产生的词 wnl=nltk.WordNetLemmatizer() [wnl.lemmatize(t) for t in tokens]