Learn Before
Concept

N-Gram Representation

Represent a sequence of n words as either w1,,wnw_1, …, w_n or w1:nw_{1:n}, and write the joint probability of each word in a sequence having a particular value as P(w1,,wn)=P(w1:n)P(w_1, …, w_n) = P(w_{1:n}). Applying the chain rule of probability gives: P(w1:n)=P(w1)...P(wnwn1)=k=1nP(wkw1:k)P(w_{1:n}) = P(w_1)...P(w_n|w_{n-1}) = \prod_{k=1}^{n}P(w_k|w_{1:k}).

0

1

Updated 2022-06-28

Tags

Data Science