How it works...

In step 1, the readWord2VecModel() method is used to load the pretrained Google News vector that was saved in compressed file format.

In step 2, the wordsNearest() method is used to find the nearest words to the given word based on positive/negative scores.

After performing step 2, we should see the following results:

You can try this technique using your own inputs to see different results.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset