O'Reilly logo

Hands-On Natural Language Processing with Python by Rajalingappaa Shanmugamani, Rajesh Arumugam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The skip-gram model

On the other hand, the skip-gram model does the inverse of the CBOW task, predicting the context words by using the target words. Taking the example we discussed earlier, in the sentence, The cat sat on the dirty mat, skip-gram tries to predict the target word vectors for the, cat, sat, on, and dirty, using the context word vector for mat. Hence, for the context word mat, we predict the target words (the, cat, sat, on, dirty), which are represented as (mat, the), (mat, cat), (mat, sat), (mat, on), (mat, dirty). 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required