Scikit learn ngram_range purpose in TF-IDF vectorizer?

scikit-learn

Solution

ngram_range(1, 2) means unigrams and bigrams, (2, 2) means only bigrams.. Don't you think the docstring is precise enough:

The lower and upper boundary of the range of n-values for different n-grams to be extracted. All values of n such that min_n <= n <= max_n will be used.

How would you change the docstring to be more helpful?

Problem

What is the use of ngram_range in vectorizers like countvectorizer and TF-IDF vectorizer. I mean ngram_range(1,1) is for unigram. what it means for ngram_range(1,2) and (2,2)???

Original source