1 / 18

Viterbi Algorithm

Viterbi Algorithm. Ralph Grishman G22.2590 - Natural Language Processing. Computing Probabilities. viterbi [ s, t ] = max(s’) ( viterbi [ s’, t-1] * transition probability P(s | s’) * emission probability P (token[t] | s) ) for each s, t:

fgardner
Download Presentation

Viterbi Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Viterbi Algorithm Ralph Grishman G22.2590 - Natural Language Processing

  2. Computing Probabilities viterbi [ s, t ] = max(s’) ( viterbi [ s’, t-1] *transition probability P(s | s’) *emission probability P (token[t] | s) ) for each s, t: record which s’, t-1 contributed the maximum

  3. Analyzing Fish sleep.

  4. 0.2 0.1 0.8 0.7 0.8 start noun verb end 0.2 0.1 0.1 A Simple POS HMM

  5. Word Emission ProbabilitiesP ( word | state ) • A two-word language: “fish” and “sleep” • Suppose in our training corpus, • “fish” appears 8 times as a noun and 4 times as a verb • “sleep” appears twice as a noun and 6 times as a verb • Emission probabilities: • Noun • P(fish | noun) : 0.8 • P(sleep | noun) : 0.2 • Verb • P(fish | verb) : 0.4 • P(sleep | verb) : 0.6

  6. Viterbi Probabilities

  7. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1

  8. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 1: fish

  9. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 1: fish

  10. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 2: sleep (if ‘fish’ is verb)

  11. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 2: sleep (if ‘fish’ is verb)

  12. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 2: sleep (if ‘fish’ is a noun)

  13. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 2: sleep (if ‘fish’ is a noun)

  14. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 2: sleeptake maximum,set back pointers

  15. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 2: sleeptake maximum,set back pointers

  16. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 3: end

  17. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Token 3: endtake maximum,set back pointers

  18. 0.2 0.1 0.8 0.7 0.8 end start noun verb 0.2 0.1 0.1 Decode:fish = nounsleep = verb

More Related