> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> library(tidytext)
Warning message:
package ‘tidytext’ was built under R version 3.5.3 
> library(janeaustenr)
Warning message:
package ‘janeaustenr’ was built under R version 3.5.3 
> bi_grams <- austen_books()%>%
+ unnest_tokens (bigram, text, token = "ngrams", n = 2)
Warning message:
The `printer` argument is deprecated as of rlang 0.3.0.
This warning is displayed once per session. 
> bi_grams
# A tibble: 725,049 x 2
   book                bigram         
   <fct>               <chr>          
 1 Sense & Sensibility sense and      
 2 Sense & Sensibility and sensibility
 3 Sense & Sensibility sensibility by 
 4 Sense & Sensibility by jane        
 5 Sense & Sensibility jane austen    
 6 Sense & Sensibility austen 1811    
 7 Sense & Sensibility 1811 chapter   
 8 Sense & Sensibility chapter 1      
 9 Sense & Sensibility 1 the          
10 Sense & Sensibility the family     
# ... with 725,039 more rows
> bi_grams %>%
+ count (bigram, sort = TRUE)
# A tibble: 211,236 x 2
   bigram       n
   <chr>    <int>
 1 of the    3017
 2 to be     2787
 3 in the    2368
 4 it was    1781
 5 i am      1545
 6 she had   1472
 7 of her    1445
 8 to the    1387
 9 she was   1377
10 had been  1299
# ... with 211,226 more rows
> 
