Use the NLTK package and the solution templates to complete these tasks!

Natural Language Processing

  1. Play around with NLTK. It's a fantastic package with a lot of functionality.
  2. Write a function to extract bigrams from text, returning only those that don't incude words occuring in a set of stopwords passed to the function.
  3. Write a function that, given a corpus of text and a number of stopwords, returns the n most common bigrams not containing the given stopwords and their counts.
  4. Write a function that, given a corpus of text, make a pandas data frame that contains binary columns indicating presence of a set of bigrams in each of the corpus' texts.
  5. Write a function that, given a corpus of positive and negatve texts, makes a classifier that will predict positive or negative sentiment in a text. Return the classifier and the relevant bigrams.