context dirichlet allocation code