How to create a feature vector from text with a deep learning aproach?. Im new at this topic, could anybody advice me where to start and how to aproach this task?.
2 Answers
What do you mean "a deep learning approach"?
You can represent text as a bag of words (a vector of word counts, or binary variables (word presence), with dimensions indexed by a reference dictionary).
Word embeddings are continuous valued vectors used to embed individual words, and can also be combined to represent groups of words (e.g. additively or using a recurrent neural net). Usually for smaller amounts of text (like 1 sentence at a time), in the applications I can remember.
See the papers: "learning word embeddings efficiently with noise-contrastive estimation" by Mnih and Kavokuoglu, and "A neural probabilistic language model" by Bengio et al.
To construct a feature vector from text start with data pre-processing: tokenization, stop-word removal, stemming. Then you would want to construct a dictionary mapping indices to words present in your corpus. From here, you could use pre-trained word-embeddings (e.g. word2vec or Glove) to represent each word as a dense vector. This embedding layer will be the input to your neural network. Alternatively, you can work with dictionary indices as in the following example of sentiment prediction.