For our model, note that Negative Binomial is obtained from a Poisson distribution Po(λ) whose parameter λ again follows a Gamma distribution Ga(r, b) and integrated out: This construction exactly mirrors the Poisson-Gamma word length distribution in (Mochihashi et al., 2009) with sampled λ.
to sample words and states (part-of-speech) jointly, we first compute inside probabilities forward from BOS to EOS and sample backwards from EOS according to the Forward filtering-Backward sampling algorithm (Scott, 2002).