April 2018
Beginner
238 pages
7h 13m
English
We use textFile to load the file. Once loaded, we use glom() to coalesce every pair of words together in the file. We then join them together and produce a map of the entirety (sentences).
From sentences, we pull out all the bigrams (reduced by flatMap).
The last step is to pull the highest number of bigrams occurring.