Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Recurrent Neural Networks with Python Quick Start Guide

You're reading from  Recurrent Neural Networks with Python Quick Start Guide

Product type Book
Published in Nov 2018
Publisher Packt
ISBN-13 9781789132335
Pages 122 pages
Edition 1st Edition
Languages
Author (1):
Simeon Kostadinov Simeon Kostadinov
Profile icon Simeon Kostadinov

Preparing the data

In this section, we will focus on how our data (tweets, in this case) is transformed to fit the model's requirements. We will first see how, using the files in the data/ folder from the GitHub repo for this task, the model can help us extract the needed tweets. Then, we will look at how, with the help of a simple set of functions, we can split and transform the data to achieve the needed results. 

An important file to examine is data.py, inside the data/twitter folder. It transforms plain text into a numeric format so it is easy for us to train the network. We won't go deep into the implementation, since you can examine it by yourself. After running the code, we produce three important files:

  • idx_q.npy: This is an array of arrays containing index representation of all the words in different sentences forming the chatbot questions...
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}