我需要实现scikit-learn的kMeans来对文本文档进行聚类。示例代码本身可以正常工作,但需要使用一些20newsgroups数据作为输入。我想要使用相同的代码来对如下所示的文档列表进行聚类:
documents = ["Human machine interface for lab abc computer applications",
"A survey of user opinion of computer system response time",
"The EPS user interface management system",
"System and human system engineering testing of EPS",
"Relation of user perceived response time to error measurement",
"The generation of random binary unordered trees",
"The intersection graph of paths in trees",
"Graph minors IV Widths of trees and well quasi ordering",
"Graph minors A survey"]
我需要在kMeans示例代码中做哪些更改才能将此列表用作输入?(仅仅使用“dataset = documents”是不起作用的)