title: How can I get pairs of words from a sentence with NLTK?
body: <p>I want to take in a sentence: </p>
  
  <pre><code>sentence = "How many people are here"?
  </code></pre>
  
  <p>and return a list of phrases: </p>
  
  <pre><code>pairs = ["How many", "many people", "people are", "are here"]
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>   tokens = nltk.word_tokenize(sentence)
     pairs = nltk.bigrams(tokens)
  </code></pre>
  
  <p>and instead got <code>&lt;generator object bigrams at 0x103697820&gt;</code></p>
  
  <p>Im pretty new to nltk so sorry that this is so off :) Help appreciated!</p>