# Q1 (2 marks)

Subject: Natural Language Processing

Exam: M2

Reader: https://deep-learning-study-room.vercel.app/nlp/#m2/mocks/mock-c/q1

Canonical: https://deep-learning-study-room.vercel.app/read/nlp/m2/mocks/mock-c--q1/

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)}
$$



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.6
$$



#### Step 2. Verb emission



$$
P(\text{cat}\mid V)=\frac14=0.25
$$



P(cat|N)=0.6 and P(cat|V)=0.25.
