Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Natural Language Processing with Python Quick Start Guide

You're reading from  Natural Language Processing with Python Quick Start Guide

Product type Book
Published in Nov 2018
Publisher Packt
ISBN-13 9781789130386
Pages 182 pages
Edition 1st Edition
Languages
Author (1):
Nirant Kasliwal Nirant Kasliwal
Profile icon Nirant Kasliwal

Vectorizing a specific dataset

This section focuses almost exclusively on word vectors and how we can leverage the Gensim library to perform them.

Some of the questions we want to answer in this section include these:

  • How do we use original embedding, such as GLoVe?
  • How do we handle Out of Vocabulary words? (Hint: fastText)
  • How do we train our own word2vec vectors on our own corpus?
  • How do we train our own word2vec vectors?
  • How do we train our own fastText vectors?
  • How do we use similar words to compare both of the above?

First, let's get started with some simple imports, as follows:

import gensim
print(f'gensim: {gensim.__version__}')
> gensim: 3.4.0

Please ensure that your Gensim version is at least 3.4.0. This is a very popular package which is maintained and developed mostly by text processing experts over at RaRe Technologies. They use the same library in...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}