Building Common Vocabulary and Vectorizing Documents (based upon Bag of Words Model)
in this topic, I’m not understanding why are you take some value of zero in vector[3:7]=0
. Please make clear this.
and why we need of inverse transform.
@Prateek-Narang-10209158320224419
@Rahul_garg
@rachitbansal2500
Bag of Words - Constructing Vocab: NLTK topic
Hey Vinay,
We are simply creating a sample vector of a sentence here. Once we have fit countvectorizer on a text, we transform it over a sentence to obtain the text in the vectorised form. Similarly, if we have such a vector with us we can use the inverse_transform function to obtain the words corresponding to the vectors.
I hope this resolves your doubt.