January 2018
Intermediate to advanced
474 pages
10h 23m
English
For the purpose of demonstrating the example, we create a small validation set of 8 words, each word is randomly chosen from the word with a word-id between 0 to 10 x 8.
valid_size = 8x_valid = np.random.choice(valid_size * 10, valid_size, replace=False)print(x_valid)
As an example, we get the following as our validation set:
valid: [64 58 59 4 69 53 31 77]
We shall use this validation set to demonstrate the result of the word embeddings by printing the five closest words.
Read now
Unlock full access