Detailed explanation of the mathematical principles in word2vec