Project one – performing sentiment analysis of IMDb movie reviews using multilayer RNNs
You may recall from Chapter 8, Applying Machine Learning to Sentiment Analysis, that sentiment analysis is concerned with analyzing the expressed opinion of a sentence or a text document. In this section and the following subsections, we will implement a multilayer RNN for sentiment analysis using a many-to-one architecture.
In the next section, we will implement a many-to-many RNN for an application language modeling. While the chosen examples are purposefully simple to introduce the main concepts of RNNs, language modeling has a wide range of interesting applications such as building chatbot — giving computers the ability to directly talk and interact with a human.
Preparing the data
In the preprocessing steps in Chapter 8, Applying Machine Learning to Sentiment Analysis, we created a clean dataset named movie_data.csv
, which we'll use again now. So, first let's import the necessary...