Reflection

Darahnya berdesir ketika nayanikanya bersitatap dengan milik sang tuan. Rasanya … aneh. Sang hawa menunduk–memegang dadanya yang berdegup kencang–sambil menatapnya lagi. Berdiri dengan kepala…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Word2Vec in Practice for Natural Language Processing

In this post I would be taking you through:

Before diving into Word2Vec we have to know what actually word embedding is and why is it actually required. So let's get started.

Word embeddings are a type of word representation that allows words with similar meaning to have a similar representation. As we cannot feed in the words directly into the neural networks we have to somehow represent them in the form of vectors of some length. The length of these vectors is basically a hyperparameter. There are a number of algorithms using which we can map the words to the vectors. One of those algorithms is Word2Vec. This algorithm performed well when compared with other algorithms that already had been existed and we in the use before.

Now why Word2Vec is better when compared to Bag of Words and TF-IDF? When we refer to how actually Bag of words and TF-IDF work we can clearly see that they don't actually give the sense of where actually the word is being used or in which context the word is being used. They are just a vector having numbers that do not make much sense. Whereas the word embeddings done by word2vec are such that the words with similar meanings have almost the same embedding vector. This gives us a sense of where this particular will actually be used. Below you can see how the word embeddings using word2vec of some of the words would look like. The values are color-coded. Each color represents some value.

Now if you do some arithmetic like King — Man + Woman = Queen.

This could be explained as the word King would mean royalty and a male as the gender. If we subtract man from it the information related to gender is lost but the royalty still prevails. When you add Woman to it, which means now the embedding has the information of royalty and the female as the gender. Which is basically a Queen. In…

Add a comment

Related posts:

USA I

Un concurso organizado por Museum of Modern Art en Nueva York en el año 1940, en el cual sorprenden los diseños ganadores de Charles Eames y Eero Saarinen. Los Eames eran un equipo de marido y mujer…

Guide to Git and GitHub..!

Complete guide about git and GitHub. — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — - Q1. What exactly do u mean by Git and Github? Ans. Git is a popular control…

Blockchain technology is about to change the game industry

The application of blockchain technology to the game industry has caused many changes in the game field, such as the replacement of virtual currency with cryptocurrency, the confirmation of digital…