We keep track of the expected counts at global level, subtract the local mean counts for t i before update, run the inside-outside recursion using θ CVB , and finally add the updated distribution back into the global counts.
we only need to replace the parameters with the expected counts, and make update after each sentence; the core of the insideoutside implementation remains the same.