stMind

about Tech, Computer vision and Machine learning

2020-07-04から1日間の記事一覧

imdb_reviews datasetのレビューに含まれるunique wordの上位N件の分布

レビューのテキストに含まれる語には、どういったものがあるか。特に、上位に含まれる語について、分布を見てみます。 scikit-learnのCountVectorizerを使って実装します。 def get_top_n_words(corpus, n=20, is_stop_words=False): vectorizer = CountVect…