def content_text(text):
    stopwords = set(nltk.corpus.stopwords.words('english'))
with_stp = Counter()
without_stp = Counter()
for word in text:
    word = word.lower()
if word in stopwords:
    with_stp.update([word])
else:
    without_stp.update([word])
return [k for k, _ in with_stp.most_common(10)], [y for y, _ in without_stp
    .most_common(10)]
print(content_text(nltk.corpus.inaugural.words('2009-Obama.txt')))
Print 10 most frequently occurring words of a text that including and excluding stopwords