Formular. 2 in the paper.
the beta-bernoulli prior part of p[0]= (q+C-|a|-1) and p[1] = (p+|a|) is easy to derive as the fraction or two marginal likelihhood, P(a_{1:C}|p,q) / P(a_{-c}|p,q),
but the Dirichlet-Multinomial likelihood part is somehow confusing to understand. Can anyone explain it?