The probability p(w|t, h) can be estimated similarly.
to reduce the computational cost of normalising over the entire vocabulary, we factorize the probability as P (w|h) = P (c|t, h)P (w|c, t, h), where c = c(w) is the unique class of word w. For each c, let Γ(c) be the set of words in that class.