Exercise set 5

Viterbi algorithm

Show how the Viterbi algorithm will tag a sentence. You can find the sentence and all necessary information in the following files. (There is an unfortunate line break in a table which it turned out hard to get rid of. Hopefully, you have no problems in parsing the table.) We have also included code version if you would like to do the calculations in Python:

I have updated the text and code, Monday 30 Sept. 1130. The original lacked tag_counts for <s> and <\s> and counts for '.' in the sentence.

Smoothing

Last week we saw how we could apply Laplace add-one smoothing to a bigram model. This is not the preferred way to smoth bigrams, trigrams etc.  One would rather use interpolation, backoff, or more advanced methods. In this exercise, use interpolation to smooth the bigram model from last week. You can assume that lambda_1 = lambda_2 = 0.5. This is similar to exercise 3.7 in J&M 3.ed. Also the exercises 3.1-3.6 are good training if you would like some more practice.

Practical work

You can get help if you have any problems with the practical exercises from set 3 or set 4. And you can ask questions of clarification to mandatory assignment 2