1
$\begingroup$

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?.

$\endgroup$

2 Answers 2

1
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.