Natural Language Processing · M2 · mocks

Q1 (2 marks)

M2 Mock C · mixed numerical practice

M2 · confirmed 2 + 2 + any two of 3 + 3 + 3 · worked practice

Q1

A corpus contains five occurrences tagged Noun. Three of them are “cat”. It contains four Verb tokens, one of which is “cat”. Calculate P(cat|Noun) and P(cat|Verb). (2 marks)

Given

C(N)=5; C(cat,N)=3; C(V)=4; C(cat,V)=1.

To find

The two emission probabilities.

Formula and why it applies

P(w\mid t)=\frac{C(w,t)}{C(t)}LaTeX: P(w\mid t)=\frac{C(w,t)}{C(t)}

An emission conditions on the tag, so the denominator counts tokens of that tag.

Solution

Step 1. Noun emission

P(\text{cat}\mid N)=\frac35=0.6LaTeX: P(\text{cat}\mid N)=\frac35=0.6

Step 2. Verb emission

P(\text{cat}\mid V)=\frac14=0.25LaTeX: P(\text{cat}\mid V)=\frac14=0.25
P(cat|N)=0.6 and P(cat|V)=0.25.