6. Vector Representation
Overview
This chapter introduces you to the various ways in which text can be represented in the form of vectors. You will start by learning why this is important, and the different types of vector representation. You will then perform one-hot encoding on words, using the preprocessing
package provided by scikit-learn, and character-level encoding, both manually and using the powerful Keras library. After covering learned word embeddings and pre-trained embeddings, you will use Word2Vec
and Doc2Vec
for vector representation for Natural Language Processing (NLP) tasks, such as finding the level of similarity between multiple texts.