title: Get bigrams and trigrams in word2vec Gensim
body: <p>I am currently using uni-grams in my word2vec model as follows.</p>
  
  <pre><code>def review_to_sentences( review, tokenizer, remove_stopwords=False ):
      #Returns a list of sentences, where each sentence is a list of words
      #
      #NLTK tokenizer to split the paragraph into sentences
      raw_sentences = tokenizer.tokenize(review.strip())
  
      sentences = []
      for raw_sentence in raw_sentences:
          # If a sentence is empty, skip it
          if len(raw_sentence) &gt; 0:
              # Otherwise, call review_to_wordlist to get a list of words
              sentences.append( review_to_wordlist( raw_sentence, \
                remove_stopwords ))
      #
      # Return the list of sentences (each sentence is a list of words,
      # so this returns a list of lists
      return sentences
  </code></pre>
  
  <p>However, then I will miss important bigrams and trigrams in my dataset.</p>
  
  <pre><code>E.g.,
  "team work" -&gt; I am currently getting it as "team", "work"
  "New York" -&gt; I am currently getting it as "New", "York"
  </code></pre>
  
  <p>Hence, I want to capture the important bigrams, trigrams etc. in my dataset and input into my word2vec model.</p>
  
  <p>I am new to wordvec and struggling how to do it. Please help me.</p>