title: Linking text feature names to their tfidf value
body: <p>I'm using scikit-learn to extract text features from a "bag of words" text (text tokenized on single words).
  To do so, I'm using a <a href="http://scikit-learn.org/0.13/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html" rel="nofollow">TfidfVectorizer</a> to also reduce the weight of very frequent words (ie: "a", "the", etc). </p>
  
  <pre><code>text = 'Some text, with a lot of words...'
  tfidf_vectorizer = TfidfVectorizer(
      min_df=1,  # min count for relevant vocabulary
      max_features=4000,  # maximum number of features
      strip_accents='unicode',  # replace all accented unicode char
      # by their corresponding  ASCII char
      analyzer='word',  # features made of words
      token_pattern=r'\w{4,}',  # tokenize only words of 4+ chars
      ngram_range=(1, 1),  # features made of a single tokens
      use_idf=True,  # enable inverse-document-frequency reweighting
      smooth_idf=True,  # prevents zero division for unseen words
      sublinear_tf=False)
  
  # vectorize and re-weight
  desc_vect = tfidf_vectorizer.fit_transform([text])
  </code></pre>
  
  <p>I would now like to be able to link each predicted feature with its corresponding <code>tfidf</code> float value, storing it in a dict</p>
  
  <pre><code>{'feature1:' tfidf1, 'feature2': tfidf2, ...}
  </code></pre>
  
  <p>I achieved it by using</p>
  
  <pre><code>d = dict(zip(tfidf_vectorizer.get_feature_names(), desc_vect.data))
  </code></pre>
  
  <p>I would like to know if there was a better, scikit-learn native way to do such a thing.</p>
  
  <p>Thank you very much. </p>