yangliuy's implementation for Gibbs Sampling of LDA