Advanced Natural Language Processing with TensorFlow 2: Build real-world effective NLP applications using NER, RNNs, seq2seq models, Transformers, and

Bansal, Ashish



One-stop solution for NLP practitioners, ML developers, and data scientists to build effective NLP systems that can perform real-world complicated tasks

Key Features

  • Apply deep learning algorithms and techniques such as BiLSTMS, CRFs, BPE and more using TensorFlow 2
  • Explore applications like text generation, summarization, weakly supervised labelling and more
  • Read cutting edge material with seminal papers provided in the GitHub repository with full working code

Book Description

Recently, there have been tremendous advances in NLP, and we are now moving from research labs into practical applications. This book comes with a perfect blend of both the theoretical and practical aspects of trending and complex NLP techniques.

The book is focused on innovative applications in the field of NLP, language generation, and dialogue systems. It helps you apply the concepts of pre-processing text using techniques such as tokenization, parts of speech tagging, and lemmatization using popular libraries such as Stanford NLP and SpaCy. You will build Named Entity Recognition (NER) from scratch using Conditional Random Fields and Viterbi Decoding on top of RNNs.

The book covers key emerging areas such as generating text for use in sentence completion and text summarization, bridging images and text by generating captions for images, and managing dialogue aspects of chatbots. You will learn how to apply transfer learning and fine-tuning using TensorFlow 2.

Further, it covers practical techniques that can simplify the labelling of textual data. The book also has a working code that is adaptable to your use cases for each tech piece.

By the end of the book, you will have an advanced knowledge of the tools, techniques and deep learning architecture used to solve complex NLP problems.

What you will learn

  • Grasp important pre-steps in building NLP applications like POS tagging
  • Use transfer and weakly supervised learning using libraries like Snorkel
  • Do sentiment analysis using BERT
  • Apply encoder-decoder NN architectures and beam search for summarizing texts
  • Use Transformer models with attention to bring images and text together
  • Build apps that generate captions and answer questions about images using custom Transformers
  • Use advanced TensorFlow techniques like learning rate annealing, custom layers, and custom loss functions to build the latest DeepNLP models

Who this book is for

This is not an introductory book and assumes the reader is familiar with basics of NLP and has fundamental Python skills, as well as basic knowledge of machine learning and undergraduate-level calculus and linear algebra.

The readers who can benefit the most from this book include intermediate ML developers who are familiar with the basics of supervised learning and deep learning techniques and professionals who already use TensorFlow/Python for purposes such as data science, ML, research, analysis, etc.


Ashish is an AI/ML leader, a well-known speaker, and an astute technologist with over 20 years of experience in the field. He has a Bachelor's in technology from IIT BHU, and an MBA in marketing from Kellogg School of Management. He is currently the Director of Recommendations at Twitch where he works on building scalable recommendation systems across a variety of product surfaces, connecting content to people. He has worked on recommendation systems at multiple organizations, most notably Twitter where he led Trends and Events recommendations and at Capital One where he worked on B2B and B2C products. Ashish was also a co-founder of GALE Partners, a full-service digital agency in Toronto, and spent over 9 years at SapientNitro, a leading digital agency.


  1. Essentials of NLP
  2. Understanding Sentiment in Natural Language with BiLSTMs
  3. Named Entity Recognition (NER) with BiLSTMs, CRFs and Viterbi Decoding
  4. Transfer Learning with BERT
  5. Generating Text with RNNs and GPT-2
  6. Text Summarization with Seq2seq Attention and Transformer Networks
  7. Multi-Modal Networks and Image Captioning with ResNets and Transformer Networks
  8. Weakly Supervised Learning for Classification with Snorkel
  9. Building Conversational AI Applications with Deep Learning
  10. Installation and Setup Instructions for Code