<:> Calculating n-gram probabilities



One way to obtain the n-gram probabilities is to identify each individual n-gram and then compute its relative frequency in the sequence.

But this is exponentially costly.

Instead, we can use the chain rule to build up the probabilities incrementally.