What is emdding
Embedding is to express the word by vector, which is equivalent to encoding the word motivation
For example, cats, dogs, of course, we can directly express them as some independent discrete symbols, but this expression is meaningless, and will produce a large number of sparse data. So we have to look for more data when we train the statistical model. and the vector representation of words will overcome the above problems. Background
VSM (vector space model)
The core idea is to put some words in the vector space representation method. The most basic application is TF-IDF.
We represent a document in a set of vectors and then compute the cosine of the document to measure the similarity of the document.
VSM has a very rich application history in NLP, but the model is based on distributed assumptions.
Distributed assumptions
The core idea is that the words appearing in contextual situations have similar semantics.
The approach based on this assumption can be broadly divided into two categories:
– Counting methods. Latent semantic analysis (latent sematics analyses)
– Forecasting methods. Probabilistic model of neural system
Using neural network training language model, the classic is Bengio in 2003 published in the JMLR "A Neural probabilistic Language model"
The simplest word vector, when it belongs to the One-hot, is not ideal, and distributed represention is much better than one-hot, and a guess is that the expression of one-hot is equivalent to an isolated point in space, and distributed representation, there is a risk of sharing the feeling, as the document says, is spread to many words above.
Neural Probabilistic language model
The classic is Bengio in 2003 published in the JMLR "A Neural probabilistic Language model", the paper presented the following models:
Among them, W,u is the weight. P and Q represent biased items (bias)
The input of V is a word vector that has been trained well.
The number of input is similar to N-gram, for example, if only with the previous n-1 words have about, then the input layer is n-1, if the vector size of M, then the projection layer is (n-1) *m size, the hidden layer is determined by the size of the corpus, assuming that there are c.
So what is the difference between the neural network language model and the traditional n-gram?
(1) The similarity between words can be expressed by means of word vectors. (Sentence level)
(2) Self-smoothing function. (Word level)
"Here is not very understand, then look at the original article"
http://blog.csdn.net/itplus/article/details/37969817 Word2vec
Original Author: Tomas Mikolov
Classic article:
Two kinds of derivation: Cbow Skip-gram