{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

languagemodeling

K1nk1c so in the future we expect k1nk1c of the

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: of 8 ­byte float) Dan Jurafsky Smoothing for Web ­scale N ­grams •  “Stupid backoff” (Brants et al. 2007) •  No discoun*ng, just use rela*ve frequencies " count(wii!k+1 ) $ if count(wii!k+1 ) > 0 $ i!1 i!1 S (wi | wi!k+1 ) = # count(wi!k+1 ) $ ! 0.4 S (wi | wii!1+2 ) otherwise $ k % S (wi ) = 63 count(wi ) N Dan Jurafsky N ­gram Smoothing Summary •  Add ­1 smoothing: •  OK for text categoriza*on, not for language modeling •  The most commonly used method: •  Extended Interpolated Kneser ­Ney •  For very large N ­grams like the Web: •  Stupid backoff 64 Dan Jurafsky Advanced Language Modeling •  Discrimina*ve models: •  choose n ­gram weights to improve a task, not to fit the training set •  Parsing ­based models •  Caching Models •  Recently used words are more likely to appear PCACHE (w | history) = ! P(wi | wi!2 wi!1 ) + (1 ! ! ) c(w " history) | history | •  These perform very poorly for speech recogni*on (why?) Language Modeling Interpola*on, Backoff, and Web ­Scale LMs Language Modeling Advanced: Good Turing Smoothing Dan Jurafsky Reminder: Add-1 (Laplace) Smoothing c(wi!1, wi ) + 1 PAdd !1 (wi | wi!1 ) = c(wi!1 ) + V Dan Jurafsky More general formulations: Add-k c(wi!1, wi ) + k PAdd !k (wi | wi!1 ) = c(wi!1 ) + kV 1 c(wi!1, wi ) + m( ) V PAdd !k (wi | wi!1 ) = c(wi!1 ) + m Dan Jurafsky Unigram prior smoothing 1 c(wi!1, wi ) + m( ) V PAdd !k (wi | wi!1 ) = c(wi!1 ) + m c(wi!1, wi ) + mP(wi ) PUnigramPrior (wi | wi!1 ) = c(wi!1 ) + m Dan Jurafsky Advanced smoothing algorithms •  Intui*on used by many smoothing algorithms •  Good ­Turing •  Kneser ­Ney •  Wi_en ­Bell •  Use the count of things we’ve seen once •  to help es*mate the count of things we’ve never seen Dan Jurafsky Nota1on: Nc = Frequency of frequency c •  Nc = the coun...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern