```r
library(widyr)

newsgroup_cors <- words_by_newsgroup %>%
  pairwise_cor(newsgroup, word, n, sort = TRUE)

newsgroup_cors
```

```
## # A tibble: 380 x 3
##    item1                    item2                    correlation
##    <chr>                    <chr>                          <dbl>
##  1 talk.religion.misc       soc.religion.christian         0.835
##  2 soc.religion.christian   talk.religion.misc             0.835
##  3 alt.atheism              talk.religion.misc             0.779
##  4 talk.religion.misc       alt.atheism                    0.779
##  5 alt.atheism              soc.religion.christian         0.751
##  6 soc.religion.christian   alt.atheism                    0.751
##  7 comp.sys.mac.hardware    comp.sys.ibm.pc.hardware       0.680
##  8 comp.sys.ibm.pc.hardware comp.sys.mac.hardware          0.680
##  9 rec.sport.baseball       rec.sport.hockey               0.577
## 10 rec.sport.hockey         rec.sport.baseball             0.577
## # ... with 370 more rows
```