Renamed 'words' to 'ngrams'
Completed Katz's backoff model in the function 'predict_next_word'