Slide 21
Slide 21 text
How+to+get+to+the+core+words?+
Remove+Stopwords+with+NLTK+
even'the'acting'in'transcendence'is'solid','with'the'dreamy'
depp'turning'in'a'typically'strong'performance'
i'think'that'transcendence'has'a'pretty'solid'acting,'with'the'
dreamy'depp'turning'in'a'strong'performance'as'he'usually'does'
>>> from nltk.corpus import stopwords
>>> stop = stopwords.words('english')
>>> words = ['the', 'acting', 'in', 'transcendence', 'is',
'solid', 'with', 'the', 'dreamy', 'depp']
>>> print [word for word in words if word not in stop]
['acting', 'transcendence', 'solid’, 'dreamy', 'depp']