Context builder
The context builder uses output of the vocabulary builder, as well as words that are part of the context window, as input and generates the output.
First of all, let's understand the concept of a context window. This context window is kind of a sliding window. You can define the window size as per the NLP application in which you will use word2vec. Generally, NLP applications use the context window size of five to ten words. If you decide to go with a window size of five, then we need to consider the five words on the left side from the center word and the five words on the right side of the center word. In this way, we capture the information about what all the surrounding words are for our center word.
Here, I want to state ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access