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.
이 연습은 강의의 일부입니다
Text Mining with Bag-of-Words in R
연습 안내
The all_goog_corpus object consisting of Google pro and con reviews, is loaded in your workspace.
- Create
all_goog_corpby cleaningall_goog_corpuswith the predefinedtm_clean()function. - Create
all_tdmby convertingall_goog_corpto a term-document matrix. - Create
all_mby convertingall_tdmto a matrix. - Construct a
comparison.cloud()fromall_m. Setmax.wordsto100. Thecolorsargument is specified for you.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Create all_goog_corp
___ <- ___
# Create all_tdm
___ <- ___
# Create all_m
___ <- ___
# Build a comparison cloud
___(___,
max.words = ___,
colors = c("#F44336", "#2196f3"))