Vectorization
Vectorization is an important aspect of feature extraction in the NLP domain. Transforming the text into a vector format is a major task.
Vectorization techniques try to map every possible word to a specific integer. There are many available APIs that make your life easier. scikit-learn has DictVectorizer to convert text to a one-hot encoding form. The other API is the CountVectorizer, which converts the collection of text documents to a matrix of token counts. Last but not least, there are a couple of other APIs out there. We can also use word2vec to convert text data to the vector form. Refer to this link's From text section for more details:
http://scikit-learn.org/stable/modules/classes.html#module-sklearn.feature_extraction.text ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access