What Is TfidfVectorizer?

What Is TfidfVectorizer? TfidfVectorizer – Transforms text to feature vectors that can be used as input to estimator. vocabulary_ Is a dictionary that converts each token (word) to feature index in the matrix, each unique token gets a feature index. What is TfidfVectorizer in NLP? TfidfVectorizer is the base building block of many NLP pipelines.