Session Ready
Exercise

Quick review of Google reviews

You decide to create a comparison.cloud() of Google's positive and negative reviews for comparison to Amazon. This will give you a quick understanding of top terms without having to spend as much time as you did, examining the Amazon reviews in the previous exercises.

We've provided you with a corpus all_goog_corpus, which has 500 positive and 500 negative reviews for Google. Here, you'll clean the corpus and create a comparison cloud comparing the common words in both pro and con reviews.

Instructions
100 XP

The all_goog_corpus object consisting of Google pro and con reviews, is loaded in your workspace.

  • Create all_goog_corp by cleaning all_goog_corpus with the predefined tm_clean() function.
  • Create all_tdm by converting all_goog_corp to a term-document matrix.
  • Create all_m by converting all_tdm to a matrix.
  • Construct a comparison.cloud() from all_m. Set max.words to 100. The colors argument is specified for you.