An n-gram model scores a sentence by multiplying probabilities taken from counts. Any bigram it never saw gets probability zero, and one zero ruins the whole product. Smoothing fixes that by giving every event a little mass. Edit the corpus, the test sentence and the smoothing, and watch the perplexity move. The numbers use the conventions of ngram_lm.py, so they match the chapter.
Perplexity of a sentence the model memorised and of your test sentence, over the whole range of alpha. Less smoothing always looks better on text the model has seen. On new text it is a U.
Interpolation blends the unigram, bigram and trigram estimates. Move the weights and watch which rows change. Row 3 is the one that matters: the trigram says impossible, the bigram has seen it, and the mix keeps the sentence alive.
The weights are rescaled to sum to 1, the one constraint. Training text: the cat sat on the mat / the cat sat on the rug / the dog sat on the mat / a cat ran to the mat.
This is n-gram Language Models. Run ngram_lm.py to print the same tables as text, or build the model yourself in Project 4.