2 Your first NLP application

 

This chapter covers

  • Building a sentiment analyzer using AllenNLP
  • Applying basic machine learning concepts (datasets, classification, and regression)
  • Employing neural network concepts (word embeddings, recurrent neural networks, linear layers)
  • Training the model through reducing loss
  • Evaluating and deploying your model

In section 1.1.2, we saw how not to do NLP. In this chapter, we are going to discuss how to do NLP in a more principled, modern way. Specifically, we’d like to build a sentiment analyzer using a neural network. Even though the sentiment analyzer we are going to build is a simple application and the library (AllenNLP) takes care of most heavy lifting, it is a full-fledged NLP application that covers a lot of basic components of modern NLP and machine learning. I’ll introduce important terms and concepts along the way. Don’t worry if you don’t understand some concepts at first. We will revisit most of the concepts introduced here in later chapters.

2.1 Introducing sentiment analysis

 
 

2.2 Working with NLP datasets

 
 
 

2.2.1 What is a dataset?

 
 
 

2.2.2 Stanford Sentiment Treebank

 
 

2.2.3 Train, validation, and test sets

 
 

2.2.4 Loading SST datasets using AllenNLP

 
 
 
 

2.3 Using word embeddings

 
 

2.3.1 What are word embeddings?

 
 
 
 

2.3.2 Using word embeddings for sentiment analysis

 
 
 

2.4 Neural networks

 
 
 
 

2.4.1 What are neural networks?

 
 
 

2.4.2 Recurrent neural networks (RNNs) and linear layers

 

2.4.3 Architecture for sentiment analysis

 
 
 

2.5 Loss functions and optimization

 
 
 
 

2.6 Training your own classifier

 
 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage