allowing control over the ngram parameter in tfidf