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 CBOW model

The CBOW model of Word2vec predicts a target word from a set of source context words. What this means is that, in the sentence, The cat sat on the dirty mat, CBOW tries to predict the target word vector for mat by using the context words, the, cat, sat, on, and dirty. In order to achieve this, CBOW builds a tuple of context-target pairs of words. Hence, for the set of context words (the, cat, sat, on, dirty), we predict the word mat, which is represented as (the, mat), (cat, mat), (sat, mat), (on, mat), (dirty, mat).

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