ツイートのワードクラウド
この演習では、航空会社に対する顧客の感情を表すTwitterデータのサンプルからワードクラウドを作成します。文字列 text_tweet が用意されており、Twitterで共有された1000人の顧客のメッセージが含まれています。
最初のステップではストップワードを削除せずにワードクラウドを作成し、次のステップではストップワードを削除してから同じワードクラウドを作成します。
まずは text_tweet リストの中身に慣れておきましょう。
この演習はコースの一部です
Pythonで学ぶSentiment Analysis
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Import the word cloud function
from ____ import ____
# Create and generate a word cloud image
my_cloud = ____(background_color='white').____(text_tweet)
# Display the generated wordcloud image
plt.imshow(my_cloud, interpolation='bilinear')
plt.axis("off")
# Don't forget to show the final image
plt.show()