The program uses two-word sequences. So, given a word X, it will choose a word Y that has followed it, favoring those that most often occurred.
See the main page for what these are and how you can modify it to make and use your own corpus.
—Mark Rosenfelder, 2018