This section is at https://rollingedition.com/language-models-from-the-ground-up/predicting-the-next-word#score-with-perplexity.