Slides - 02 01 estimNgramProbs
Slides - 02 01 estimNgramProbs
Language
Modeling
Es$ma$ng
N-‐gram
Probabili$es
Dan
Jurafsky
count(w i"1,w i )
P(w i | w i"1 ) =
count(w i"1 )
c(w i"1,w i )
P(w i | w i"1 ) =
c(w i"1 )
!
Dan
Jurafsky
An example
More
examples:
Berkeley
Restaurant
Project
sentences
• can
you
tell
me
about
any
good
cantonese
restaurants
close
by
• mid
priced
thai
food
is
what
i’m
looking
for
• tell
me
about
chez
panisse
• can
you
give
me
a
lis$ng
of
the
kinds
of
food
that
are
available
• i’m
looking
for
a
good
place
to
eat
breakfast
• when
is
caffe
venezia
open
during
the
day
Dan
Jurafsky
• Result:
Dan
Jurafsky
Prac/cal
Issues
• We
do
everything
in
log
space
• Avoid
underflow
• (also
adding
is
faster
than
mul$plying)
…
Dan
Jurafsky
http://googleresearch.blogspot.com/2006/08/all-our-n-gram-are-belong-to-you.html
Dan
Jurafsky