ここから変更を加えて質問を受けました。私は次のコードを持っています:
from nltk.corpus import stopwords
>>> def content_text(text):
stopwords = nltk.corpus.stopwords.words('english')
content = [w for w in text if w.lower() in stopwords]
return content
1) ストップワードを含み、2)ストップワードを含まないテキストの最も頻繁に出現する 10 の単語を出力するにはどうすればよいですか?