Session Ready
Exercise

Our first LDA model

In order to fit a topic model to a corpus of text, we need to provide a document-term matrix (dtm) as an input to function LDA. Now that you've seen how to do that, you can fit your very first topic model.

You are given access to a table corpus that you have seen in lesson 1. Column text contains the sentences, column id - document id.

Fill in the blanks to run the code that will display proportion of topics in each document.

Instructions
100 XP
  • In the call to unnest_tokens specify that the input column is text and the output column is word.
  • In the call to cast_dtm, specify that the token is in column word.