This paper proposes a DPMFP method for document clustering. This paper attempt to group documents into an optimal number of clusters while the number of clusters K is discovered automatically. Develop a Dirichlet Process Mixture (DPM) model to partition documents. There are two algorithms to infer DPM parameters, in particular, the variational inference algorithm and the Gibbs sampling algorithm. A Dirichlet Multinomial Allocation (DMA) model, namely DMAFP, is used to approximate the DPMFP model to simplify the process of parameter estimation. A variational inference algorithm is then derived for the DMAFP model. Experimental results show that our proposed approach is robust and effective for document clustering.