Modified predict method to use an intersection to find out the number of top words in a book.