Computations and applications of mixtures of dirichlet processes