MACS 30500
University of Chicago
Rinse and repeat
topicmodels
## <<DocumentTermMatrix (documents: 193, terms: 18215)>>
## Non-/sparse entries: 104721/3410774
## Sparsity : 97%
## Maximal term length: 19
## Weighting : term frequency (tf)
## # A tibble: 4 × 2
## consensus topic
## <chr> <int>
## 1 Great Expectations 4
## 2 Pride and Prejudice 1
## 3 The War of the Worlds 3
## 4 Twenty Thousand Leagues under the Sea 2
chapter_classifications %>%
inner_join(book_topics, by = "topic") %>%
count(title, consensus) %>%
knitr::kable()
title | consensus | n |
---|---|---|
Great Expectations | Great Expectations | 57 |
Great Expectations | Pride and Prejudice | 1 |
Great Expectations | The War of the Worlds | 1 |
Pride and Prejudice | Pride and Prejudice | 61 |
The War of the Worlds | The War of the Worlds | 27 |
Twenty Thousand Leagues under the Sea | Twenty Thousand Leagues under the Sea | 46 |
title | Great Expectations | Pride and Prejudice | The War of the Worlds | Twenty Thousand Leagues under the Sea |
---|---|---|---|---|
Great Expectations | 49770 | 3876 | 1845 | 77 |
Pride and Prejudice | 1 | 37229 | 7 | 5 |
The War of the Worlds | 0 | 0 | 22561 | 7 |
Twenty Thousand Leagues under the Sea | 0 | 5 | 0 | 39629 |
## # A tibble: 3,500 × 4
## title consensus term n
## <chr> <chr> <chr> <dbl>
## 1 Great Expectations Pride and Prejudice love 44
## 2 Great Expectations Pride and Prejudice sergeant 37
## 3 Great Expectations Pride and Prejudice lady 32
## 4 Great Expectations Pride and Prejudice miss 26
## 5 Great Expectations The War of the Worlds boat 25
## 6 Great Expectations Pride and Prejudice father 19
## 7 Great Expectations The War of the Worlds water 19
## 8 Great Expectations Pride and Prejudice baby 18
## 9 Great Expectations Pride and Prejudice flopson 18
## 10 Great Expectations Pride and Prejudice family 16
## # ... with 3,490 more rows
## <<DocumentTermMatrix (documents: 2246, terms: 10134)>>
## Non-/sparse entries: 259208/22501756
## Sparsity : 99%
## Maximal term length: 18
## Weighting : term frequency (tf)