Session Ready
Exercise

Specify the token pattern

In this exercise, you will work with the text column of the tweets dataset. Your task is to vectorize the object column using CountVectorizer. You will apply different patterns of tokens in the vectorizer. Remember that by specifying the token pattern, you can filter out characters.

The CountVectorizer has been imported for you.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Build a vectorizer from the text column, specifying the pattern of tokens to be equal to r'\b[^\d\W][^\d\W]'.