The chatbot uses trigram Markov models to generate text, with models trained on each of six different corpora. When you input something to the chatbot, it identifies which corpus your text is most likely to have come from, based on the cross-entropy of your text under that corpus model. It then responds with text generated from that corpus and seeded with your text.
Each corpus comes from the body of work of one author/playwright/songwriter and is assigned a nickname that clues a number. After you figure out who the authors are and fit their last names into the blanks given, you index the number clued by each one's nickname into their name and reading down the blanks.