Session Ready
Exercise

Use wordclouds

The flaw of function terms() is that it does not display the absolute value of the word probability. By comparison, wordclouds can convey that information through font size. In this exercise you will make wordclouds for topics found in the text on Byzantine Empire.

You are given the object with LDA model mod. You're going to complete the script to draw four wordlcouds, one for each topic. You will be able to cycle through them in the output window.

Instructions
100 XP
  • Generate a table of word frequencies for each topic.
  • Display the word cloud. You need to pass the terms to the wordargument and the frequencies to the freq argument. The for-loop will do one chart per topic.