lattice-tool question/reference

Andreas Stolcke stolcke at speech.sri.com
Wed Sep 20 13:06:25 PDT 2006


> 
> Andreas,
> I'm trying to understand what exactly it means to "compute posterior
> expected n-gram counts" using lattice-tool with the -write-ngrams option.
> 
> Would you kindly point me to a reference where I can read/learn about what
> this flag is doing?

posterior_expected_n-gram_count (X) = 
	sum over all paths P through lattice {
		posterior_probability(P) * number_of_occurrences_of(X in P) }

where

posterior_probability(Q) = exp(sum_of_all_scores_on(Q)) /
				sum over all paths P {
					exp(sum_of_all_scores_on(P)) }

exp(.) is the exponential (anti-log) function , assuming your 
scores are logarithmic.

It's a generalized form of counting ngram frequencies in lattices,
where the ngrams are weighted by the probabilities of the paths they
occur on.

--Andreas 




More information about the SRILM-User mailing list