Abstract:A method of sentiment analysis for online comment texts is proposd based on the latent Dirichlet allocation (LDA) model. The method extracts the sentiment information containing sentiment words and context with the sentiment word dictionary according to the specified collocation patterns of sentiment unit. Use the LDA model to mine the key features of the sentiment information and then combine them into the sentiment vector space. The machine-learning algorithm is used to classify the sentiment polarity of Chinese comment texts. After experiment, the presented method is proved to be effective in reducing dimensionality and text sentiment classification.