title: Clustering text documents using scikit-learn kmeans in Python
body: <p>I need to implement <a href="http://scikit-learn.org/stable/auto_examples/document_clustering.html#example-document-clustering-py" rel="noreferrer">scikit-learn's kMeans</a> for clustering text documents. The <a href="http://scikit-learn.org/stable/auto_examples/document_clustering.html#example-document-clustering-py" rel="noreferrer">example code</a> works fine as it is but takes some 20newsgroups data as input. I want to use the same code for clustering a list of documents as shown below:</p>
  
  <pre><code>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"]
  </code></pre>
  
  <p>What changes do i need to do in <a href="http://scikit-learn.org/stable/auto_examples/document_clustering.html#example-document-clustering-py" rel="noreferrer">kMeans example code</a> to use this list as input? (Simply taking 'dataset = documents' doesn't work)</p>