【文本聚类】三种聚类算法实现影评的情感分析(K-Means,Agglomerative,DBSCAN)
文本处理fromnltk.corpusimportmovie_reviews#([...],pos)#([...],neg)documents=[(list(movie_reviews.words(fileid)),category)forcategoryinmovie_reviews.categories()forfileidinmovie_reviews.fileids(category)]#