Reader small image

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

Product typeBook
Published inJul 2020
Reading LevelBeginner
PublisherPackt
ISBN-139781789802740
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Thomas Dop
Thomas Dop
author image
Thomas Dop

Thomas Dop is a data scientist at MagicLab, a company that creates leading dating apps, including Bumble and Badoo. He works on a variety of areas within data science, including NLP, deep learning, computer vision, and predictive modeling. He holds an MSc in data science from the University of Amsterdam.
Read more about Thomas Dop

Right arrow

Building a chatbot using sequence-to-sequence neural networks with attention

The easiest way to illustrate exactly how to implement attention within our neural network is to work through an example. We will now go through the steps required to build a chatbot from scratch using a sequence-to-sequence model with an attention framework applied.

As with all of our other NLP models, our first step is to obtain and process a dataset to use to train our model.

Acquiring our dataset

To train our chatbot, we need a dataset of conversations by which our model can learn how to respond. Our chatbot will take a line of human-entered input and respond to it with a generated sentence. Therefore, an ideal dataset would consist of a number of lines of dialogue with appropriate responses. The perfect dataset for a task such as this would be actual chat logs from conversations between two human users. Unfortunately, this data consists of private information and is very hard to come by within...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Natural Language Processing with PyTorch 1.x
Published in: Jul 2020Publisher: PacktISBN-13: 9781789802740

Author (1)

author image
Thomas Dop

Thomas Dop is a data scientist at MagicLab, a company that creates leading dating apps, including Bumble and Badoo. He works on a variety of areas within data science, including NLP, deep learning, computer vision, and predictive modeling. He holds an MSc in data science from the University of Amsterdam.
Read more about Thomas Dop