(500) Days of Summer

Report a typo

Tom wants to know whether the word Summer is important for the collection of texts and what kind of context surrounds this term. As you know, summer can be both a capitalized proper noun (like, for example, someone's last name) and a lowercase common noun (which denotes a class of entities).

Correct the code below, so that the vectorizer could be case-sensitive and could extract bigrams (two-word phrases) and trigrams (three-word phrases). Put the final version of this vectorizer in the answer box. Do not remove any parameters, just copy the code below and correct the values where needed.

vectorizer = TfidfVectorizer(input='content', use_idf=True, lowercase=True,
                             analyzer='word', ngram_range=(1, 1),
                             stop_words=None)
Enter a short text
___

Create a free account to access the full topic