title: Use CountVectorizer with file where every line is a document
body: <p>I have a <strong>huge</strong> file where I want to treat every line as a document and use CountVectorizer to create the vectors.</p>
  
  <p>What I have tried so far:</p>
  
  <pre><code>from sklearn.feature_extraction.text import CountVectorizer
  
  vectorizer = CountVectorizer(input='file', decode_error='ignore', strip_accents='unicode')
  corpus = open('corpus.txt')
  vectors = vectorizer.fit_transform([corpus]).toarray()
  print vectors
  print vectorizer.vocabulary_
  </code></pre>
  
  <p>The file corpus.txt</p>
  
  <pre><code>Human machine interface for lab abc computer applications
  A survey of user opinion of computer system response time
  The EPS user interface management system
  </code></pre>
  
  <p><em>What I expect is to get an array with three vectors</em>. Instead I get an array with one vector:</p>
  
  <pre><code>[[1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 2]]
  {u'lab': 7, u'eps': 3, u'applications': 1, u'management': 9, u'user': 17, u'human': 5, u'interface': 6, u'response': 12, u'abc': 0, u'for': 4, u'of': 10, u'system': 14, u'machine': 8, u'computer': 2, u'survey': 13, u'time': 16, u'opinion': 11, u'the': 15}
  </code></pre>
  
  <p>How should I proceed?</p>