Continuous bag-of-words (CBOW) trains word embeddings by predicting a target word from nearby context words. Unlike document-level bag-of-words, it uses a continuously sliding window, producing many small training examples from each document. section 6.3.2
A CBOW training set is built by:
- Taking raw domain text as the corpus. section 6.3.2
- Moving a window through each document to form many tiny synthetic documents. section 6.3.2
- Using nearby words as inputs and the central target word as output. section 6.3.2
Choosing a corpus
A medical application can learn from medical journals, while a general-purpose embedding can use Wikipedia or online news. Each corpus shapes the word representations available to the model. section 6.3.2
Figure 6.4 CBOW neural network architecture
Inspect the CBOW neural-network architecture alongside the sliding-window prediction process. section 6.3.2
