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
Hands-On Natural Language Processing with PyTorch 1.x

You're reading from  Hands-On Natural Language Processing with PyTorch 1.x

Product type Book
Published in Jul 2020
Publisher Packt
ISBN-13 9781789802740
Pages 276 pages
Edition 1st Edition
Languages
Author (1):
Thomas Dop Thomas Dop
Profile icon Thomas Dop

Table of Contents (14) Chapters

Preface 1. Section 1: Essentials of PyTorch 1.x for NLP
2. Chapter 1: Fundamentals of Machine Learning and Deep Learning 3. Chapter 2: Getting Started with PyTorch 1.x for NLP 4. Section 2: Fundamentals of Natural Language Processing
5. Chapter 3: NLP and Text Embeddings 6. Chapter 4: Text Preprocessing, Stemming, and Lemmatization 7. Section 3: Real-World NLP Applications Using PyTorch 1.x
8. Chapter 5: Recurrent Neural Networks and Sentiment Analysis 9. Chapter 6: Convolutional Neural Networks for Text Classification 10. Chapter 7: Text Translation Using Sequence-to-Sequence Neural Networks 11. Chapter 8: Building a Chatbot Using Attention-Based Neural Networks 12. Chapter 9: The Road Ahead 13. Other Books You May Enjoy

Exploring CBOW

The continuous bag-of-words (CBOW) model forms part of Word2Vec – a model created by Google in order to obtain vector representations of words. By running these models over a very large corpus, we are able to obtain detailed representations of words that represent their semantic and contextual similarity to one another. The Word2Vec model consists of two main components:

  • CBOW: This model attempts to predict the target word in a document, given the surrounding words.
  • Skip-gram: This is the opposite of CBOW; this model attempts to predict the surrounding words, given the target word.

Since these models perform similar tasks, we will focus on just one for now, specifically CBOW. This model aims to predict a word (the target word), given the other words around it (known as the context words). One way of accounting for context words could be as simple as using the word directly before the target word in the sentence to predict the target word, whereas...

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}