July 2018
Intermediate to advanced
474 pages
13h 37m
English
Before beginning, it always helps to take a look at the data and analyze it. After looking at the data, we can see that there are a lot of punctuation marks, blank spaces, quotes, and uppercase as well as lowercase letters. We need to prepare the data first before performing any kind of analysis on it or feeding it into the LSTM network. We require a number of libraries that will make handling data easier :
from keras.preprocessing.text import Tokenizerfrom keras.utils import to_categoricalfrom keras.models import Sequentialfrom keras.layers import Dense, lSTM, Dropout, Embeddingimport numpy as npfrom pickle import dumpimport string