Deep Learning for Natural Language Processing
- Length: 372 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2019-06-11
- ISBN-10: 1838550291
- ISBN-13: 9781838550295
- Sales Rank: #303468 (See Top 100 Books)
Gain the knowledge of various deep neural network architectures and their application areas to conquer your NLP issues.
Key Features
- Gain insights into the basic building blocks of natural language processing
- Learn how to select the best deep neural network to solve your NLP problems
- Explore convolutional and recurrent neural networks and long short-term memory networks
Book Description
Applying deep learning approaches to various NLP tasks can take your computational algorithms to a completely new level in terms of speed and accuracy. Deep Learning for Natural Language Processing starts off by highlighting the basic building blocks of the natural language processing domain. The book goes on to introduce the problems that you can solve using state-of-the-art neural network models. After this, delving into the various neural network architectures and their specific areas of application will help you to understand how to select the best model to suit your needs. As you advance through this deep learning book, you’ll study convolutional, recurrent, and recursive neural networks, in addition to covering long short-term memory networks (LSTM). Understanding these networks will help you to implement their models using Keras. In the later chapters, you will be able to develop a trigger word detection application using NLP techniques such as attention model and beam search.
By the end of this book, you will not only have sound knowledge of natural language processing but also be able to select the best text pre-processing and neural network models to solve a number of NLP issues.
What you will learn
- Understand various pre-processing techniques for deep learning problems
- Build a vector representation of text using word2vec and GloVe
- Create a named entity recognizer and parts-of-speech tagger with Apache OpenNLP
- Build a machine translation model in Keras
- Develop a text generation application using LSTM
- Build a trigger word detection application using an attention model
Who this book is for
If you’re an aspiring data scientist looking for an introduction to deep learning in the NLP domain, this is just the book for you. Strong working knowledge of Python, linear algebra, and machine learning is a must.
Table of Contents
- Introduction to Natural Language Processing
- Application of Natural Language Processing
- Introduction to Neural Networks
- Foundations of Convolutional Neural Network
- Recurrent Neural Networks
- Gated Recurrent Units
- Long Short-Term Memory (LSTM)
- State-of-the-Art Natural Language Processing
- A Practical NLP Project Workflow in an Organization
Preface About the Book About the Authors Description Learning Objectives Audience Approach Hardware Requirements Software Requirements Conventions Installation and Setup Install Python on Windows Install Python on Linux Install Python on macOS X Installing Keras Additional Resources Chapter 1 Introduction to Natural Language Processing Introduction The Basics of Natural Language Processing Importance of natural language processing Capabilities of Natural language processing Applications of Natural Language Processing Text Preprocessing Text Preprocessing Techniques Lowercasing/Uppercasing Exercise 1: Performing Lowercasing on a Sentence Noise Removal Exercise 2: Removing Noise from Words Text Normalization Stemming Exercise 3: Performing Stemming on Words Lemmatization Exercise 4: Performing Lemmatization on Words Tokenization Exercise 5: Tokenizing Words Exercise 6: Tokenizing Sentences Additional Techniques Exercise 7: Removing Stop Words Word Embeddings The Generation of Word Embeddings Word2Vec Functioning of Word2Vec Exercise 8: Generating Word Embeddings Using Word2Vec GloVe Exercise 9: Generating Word Embeddings Using GloVe Activity 1: Generating Word Embeddings from a Corpus Using Word2Vec. Summary Chapter 2 Applications of Natural Language Processing Introduction POS Tagging Parts of Speech POS Tagger Applications of Parts of Speech Tagging Types of POS Taggers Rule-Based POS Taggers Exercise 10: Performing Rule-Based POS Tagging Stochastic POS Taggers Exercise 11: Performing Stochastic POS Tagging Chunking Exercise 12: Performing Chunking with NLTK Exercise 13: Performing Chunking with spaCy Chinking Exercise 14: Performing Chinking Activity 2: Building and Training Your Own POS Tagger Named Entity Recognition Named Entities Named Entity Recognizers Applications of Named Entity Recognition Types of Named Entity Recognizers Rule-Based NERs Stochastic NERs Exercise 15: Perform Named Entity Recognition with NLTK Exercise 16: Performing Named Entity Recognition with spaCy Activity 3: Performing NER on a Tagged Corpus Summary Chapter 3 Introduction to Neural Networks Introduction Introduction to Deep Learning Comparing Machine Learning and Deep Learning Neural Networks Neural Network Architecture The Layers Nodes The Edges Biases Activation Functions Training a Neural Network Calculating Weights The Loss Function The Gradient Descent Algorithm Backpropagation Designing a Neural Network and Its Applications Supervised neural networks Unsupervised neural networks Exercise 17: Creating a neural network Fundamentals of Deploying a Model as a Service Activity 4: Sentiment Analysis of Reviews Summary Chapter 4 Foundations of Convolutional Neural Network Introduction Exercise 18: Finding Out How Computers See Images Understanding the Architecture of a CNN Feature Extraction Convolution The ReLU Activation Function Exercise 19: Visualizing ReLU Pooling Dropout Classification in Convolutional Neural Network Exercise 20: Creating a Simple CNN Architecture Training a CNN Exercise 21: Training a CNN Applying CNNs to Text Exercise 22: Application of a Simple CNN to a Reuters News Topic for Classification Application Areas of CNNs Activity 5: Sentiment Analysis on a Real-life Dataset Summary Chapter 5 Recurrent Neural Networks Introduction Previous Versions of Neural Networks RNNs RNN Architectures BPTT Updates and Gradient Flow Adjusting Weight Matrix Wy Adjusting Weight Matrix Ws For Updating Wx Gradients Exploding Gradients Vanishing Gradients RNNs with Keras Exercise 23: Building an RNN Model to Show the Stability of Parameters over Time Stateful versus Stateless Exercise 24: Turning a Stateless Network into a Stateful Network by Only Changing Arguments Activity 6: Solving a Problem with an RNN – Author Attribution Summary Chapter 6 Gated Recurrent Units (GRUs) Introduction The Drawback of Simple RNNs The Exploding Gradient Problem Gated Recurrent Units (GRUs) Types of Gates The Update Gate The Reset Gate The Candidate Activation Function GRU Variations Sentiment Analysis with GRU Exercise 25: Calculating the Model Validation Accuracy and Loss for Sentiment Classification Activity 7: Developing a Sentiment Classification Model Using a Simple RNN Text Generation with GRUs Exercise 26: Generating Text Using GRUs Activity 8: Train Your Own Character Generation Model Using a Dataset of Your Choice Summary Chapter 7 Long Short-Term Memory (LSTM) Introduction LSTM The Forget Gate The Input Gate and the Candidate Cell State Cell State Update Output Gate and Current Activation Exercise 27: Building an LSTM-Based Model to Classify an Email as Spam or Not Spam (Ham) Activity 9: Building a Spam or Ham Classifier Using a Simple RNN Neural Language Translation Activity 10: Creating a French-to-English translation model Summary Chapter 8 State-of-the-Art Natural Language Processing Introduction Attention Mechanisms An Attention Mechanism Model Data Normalization Using an Attention Mechanism Encoder Decoder Attention mechanisms The Calculation of Alpha Exercise 28: Build a Date Normalization Model for a Database Column Other Architectures and Developments Transformer BERT Open AI GPT-2 Activity 11: Build a Text Summarization Model Summary Chapter 9 A Practical NLP Project Workflow in an Organization Introduction General Workflow for the Development of a Machine Learning Product The Presentation Workflow: The Research Workflow: The Production-Oriented Workflow Problem Definition Data Acquisition Google Colab Flask Deployment Making Changes to a Flask Web App Use Docker to Wrap the Flask Web Application into a Container Host the Container on an Amazon Web Services (AWS) EC2 instance Improvements Summary Appendix Chapter 1: Introduction to Natural Language Processing Activity 1: Generating word embeddings from a corpus using Word2Vec. Chapter 2: Applications of Natural Language Processing Activity 2: Building and training your own POS tagger Activity 3: Performing NER on a Tagged Corpus Chapter 3: Introduction to Neural Networks Activity 4: Sentiment Analysis of Reviews Chapter 4: Introduction to convolutional networks Activity 5: Sentiment Analysis on a real-life dataset Chapter 5: Foundations of Recurrent Neural Network Activity 6: Solve a problem with RNN – Author Attribution Prepare the data Applying the Model to the Unknown Papers Chapter 6: Foundations of GRUs Activity 7: Develop a sentiment classification model using Simple RNN Activity 8: Train your own character generation model with a dataset of your choice Chapter 7: Foundations of LSTM Activity 10: Create a French to English translation model Chapter 8: State of the art in Natural Language Processing Activity 11: Build a Text Summarization Model Chapter 9: A practical NLP project workflow in an organisation Code for LSTM model Code for Flask
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Deep Learning for Natural Language Processing
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.