20.07.2013 Views

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Stabler - Lx 185/209 2003<br />

P(q1 ...qn) = P0(q1) <br />

1≤i≤n−1<br />

Given q1 ...qn, the probability <strong>of</strong> output sequence a1 ...an is<br />

P(qi+1|qi) (i)<br />

n<br />

P(at|qt). (ii)<br />

t=1<br />

The probability <strong>of</strong> q1 ...qn occurring with outputs a1 ...an is the product <strong>of</strong> the two probabilities (i)<br />

and (ii), that is,<br />

P(q1 ...qn,a1 ...an) = P0(q1) <br />

1≤i≤n−1<br />

P(qi+1|qi)<br />

n<br />

P(at|qt). (iii)<br />

(81) Given any Markov model, the probability <strong>of</strong> output sequence a1 ...an is the sum <strong>of</strong> the probabilities <strong>of</strong><br />

this output for all the possible sequences <strong>of</strong> n states.<br />

<br />

P(q1 ...qn,a1 ...an) (iv)<br />

qi∈ΩX<br />

(82) Directly calculating this is infeasible, since there are |ΩX| n state sequences <strong>of</strong> length n.<br />

8.1.9 Computing output sequence probabilities: forward<br />

Here is a feasible way to compute the probability <strong>of</strong> an output sequence a1 ...an.<br />

(83) a. Calculate, for each possible initial state qi ∈ ΩX,<br />

P(qi,a1) = P0(qi)P(a1|qi).<br />

b. Recursive step: Given P(qi,a1 ...at) for all qi ∈ ΩX, calculateP(qj,a1 ...at+1) for all qj ∈ ΩX as<br />

follows<br />

P(qj,a1 ...at+1) = <br />

P(qi,a1 ...at)P(qj|qi) P(at+1|qj)<br />

i∈ΩX<br />

c. Finally, given P(qi,a1 ...an) for all qi ∈ ΩX,<br />

P(a1 ...an) = <br />

qi∈ΩX<br />

P(qi,a1 ...an)<br />

(84) Let’s develop the c<strong>of</strong>fee machine example from (66), adding outputs so that we have a Markov model<br />

instead <strong>of</strong> just a Markov chain. Suppose that there are 3 output messages:<br />

(s1) thank you<br />

(s2) no change<br />

(s3) x@b*/!<br />

Assume that these outputs occur with the probabilities given in the following matrix where row i column<br />

j represents the probability <strong>of</strong> emitting symbol sj ⎡<br />

when<br />

⎤<br />

in state i:<br />

0.8 0.1 0.1<br />

⎢<br />

⎥<br />

O= ⎣0.1<br />

0.8 0.1⎦<br />

0.2 0.2 0.6<br />

Exercise: what is the probability <strong>of</strong> the output sequence<br />

s1s3s3<br />

Soluti<strong>on</strong> sketch: (do it yourself first! note the trellis-like c<strong>on</strong>structi<strong>on</strong>)<br />

144<br />

t=1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!