Vẽ đám mây từ

Nhập môn Phân tích Văn bản bằng R

Maham Faisal Khan

Senior Data Science Content Developer

Dùng wordcloud()

library(wordcloud)

word_counts <- tidy_review %>% count(word)
wordcloud( words = word_counts$word, freq = word_counts$n, max.words = 30 )

Nhập môn Phân tích Văn bản bằng R

Kích thước cố định và điểm bắt đầu ngẫu nhiên

wordcloud(
  words = word_counts$word, 
  freq = word_counts$n, 
  max.words = 30
)

Nhập môn Phân tích Văn bản bằng R

Số từ trong đám mây

wordcloud(
  words = word_counts$word, 
  freq = word_counts$n, 
  max.words = 70
)

Nhập môn Phân tích Văn bản bằng R

Sử dụng màu sắc

wordcloud(
  words = word_counts$word, 
  freq = word_counts$n, 
  max.words = 30,
  colors = "blue"
)

Nhập môn Phân tích Văn bản bằng R

Hãy luyện tập!

Nhập môn Phân tích Văn bản bằng R

Preparing Video For Download...