Search SRILM-USER Archives

Match: Format: Sort by:
Search:

Re: lattice-tool question/reference

From: Andreas Stolcke <stolcke at ADDRESS HIDDEN>
Date: Wed, 20 Sep 2006 13:06:25 PDT

>
> 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

Click here to go to the SRILM home page.