title: Combining filters in nltk collocations
body: <p>I want to be able to apply a combination of multiple filters to bigrams using <a href="http://www.nltk.org/howto/collocations.html" rel="nofollow">nltk collocations</a>. The problem is as follows :</p>
  
  <p>I need to keep bigrams that either occur more than once or is present on a word list. Note that, I want to <strong>KEEP</strong> the bigrams that are in the word list -- if I wanted to remove them I could simply apply one filter after the other. </p>
  
  <p>I know that there is a frequency filter, and also I can separately check for words in a list using the following :</p>
  
  <pre><code>lambda *w: w not in [w1,w2,w3]
  </code></pre>
  
  <p>But I do not know how to check the frequency of bigram in this function.</p>
  
  <p>How do we get the frequency of the bigrams passed to lambda ? </p>