0
$\begingroup$

what is sentence embeding ? How to do sentence embedding for sentence like example ""How old are you" ? how to use word embedding to create a sentence embedding ?

$\endgroup$
0
$\begingroup$

It could be just a simple average of word vectors; words that are a member of the sentence. However, there are other methods that could work better. Please see this article:

In the paper Unsupervised Learning of Sentence Embeddings using Compositional N-Gram Features, a new model for sentence embeddings called Sent2Vec is introduced. Sent2Vec presents a simple but efficient unsupervised objective to train distributed representations of sentences. It can be thought of as an extension of FastText and word2vec (CBOW) to sentences. The sentence embedding is defined as the average of the source word embeddings of its constituent words. This model is furthermore augmented by also learning source embeddings for not only unigrams but also n-grams of words present in each sentence, and averaging the n-gram embeddings along with the words.

$\endgroup$
  • $\begingroup$ so just for the sake of understanding .Take sentence "How are you" consider the vector for word "how" is =[ 2,4,6,8] consider the vector for word "are" =[ 4,6,8,2] consider the vector for word "you" =[ 6,8,2,4] How to calculate the vector for sentence should we take average based on total token or total dimnesion on each vector ? vector1 1st value +vector2 1st value +vector3 1st value /3 [(2+4+6)/3,(4+6+8)/3,(6+8+2)/3,(8+2+4)/3)] vector1 1st value +vector2 1st value +vector3 1st value //4 or [(2+4+6)/4,(4+6+8)/4,(6+8+2)/4,(8+2+4)/4)] $\endgroup$ – Aj_MLstater Oct 21 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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