The procedure for calculating these statistics is described in Li and Eisner (2009), which amounts to using an expectation semiring (Eisner, 2001) to compute expected transitions in τ •μ * under the probability distribution τ • µ.
from there, we need to create the automaton we need to divide out the influence of τ (w).