Abstract:Combining background application requirement of online public opinion analysis, this paper firstly introduces the processing of text information, and then discusses the K-means algorithm of the text clustering, according to its characteristic that clustering results depend on the centers of initial clustering, and improves it. Based on the thought that text title can express its content, the improved algorithm uses sparse character vector to express text title, calculates the sparse similarity of them and ascertains the centers of initial clustering. The experiments show that the method improves the clustering accuracy. Compared with another algorithm based on the principle of maximum and minimum distance, the improved method heightens the efficiency and ensures the clustering accuracy.