Bayesian Inference Using an Extension of the Dirichlet Process