Natural Language Processing · free preview

Smoothing, Interpolation, and Backoff

Why zero counts break perplexity, Laplace and add-k smoothing, mixing n-gram orders by interpolation, and stupid backoff scoring.

1. Smoothing, Interpolation, and Backoff

Smoothing, Interpolation, and Backoff

2. Adding counts, blending orders, backing off

Adding counts, blending orders, backing off

3. Smoothing a bigram table three ways

Smoothing a bigram table three ways

4. Laplace unigram smoothing

A word occurs 29 times in a corpus of 1,089,757 tokens with vocabulary size 5,873. What is its Laplace-smoothed (add-one) unigram probability? Round to six decimal places.

5. Laplace bigram smoothing

In a corpus with vocabulary size 1,534, the word "tide" occurs 120 times and the sequence "tide turns" occurs 18 times. What is the add-one smoothed estimate of P(turns∣tide)P(\text{turns} \mid \text{tide})? Use four decimal places.

6. Add-k smoothing

With k=0.1k = 0.1, vocabulary size 5,733, prefix count C(fog)=78C(\text{fog}) = 78 and pair count C(fog drift)=8C(\text{fog drift}) = 8, compute the add-k smoothed P(drift∣fog)P(\text{drift} \mid \text{fog}). Round to four decimal places.

7. Linear interpolation

A trigram model is smoothed by interpolation with λ1=0.4\lambda_1 = 0.4 on the unigram estimate, λ2=0.6\lambda_2 = 0.6 on the bigram estimate, and λ3=0\lambda_3 = 0 on the trigram (its count is zero). Suppose P(w)=0.03P(w) = 0.03 and P(w∣h)=0.5P(w \mid h) = 0.5 for the word in question. What is the interpolated probability? Use three decimals.

8. Stupid backoff score

A stupid backoff model uses weight α=0.4\alpha = 0.4 and terminates in the unigram distribution. For the next word ww, the trigram count is zero, the bigram count is positive with relative frequency 0.5 and the bigram estimate is 0.5. Compute the stupid backoff score S(w∣context)S(w \mid \text{context}). Round to four decimal places.

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course for free