Book Image

Natural Language Processing with Python Quick Start Guide

By : Nirant Kasliwal
Book Image

Natural Language Processing with Python Quick Start Guide

By: Nirant Kasliwal

Overview of this book

NLP in Python is among the most sought after skills among data scientists. With code and relevant case studies, this book will show how you can use industry-grade tools to implement NLP programs capable of learning from relevant data. We will explore many modern methods ranging from spaCy to word vectors that have reinvented NLP. The book takes you from the basics of NLP to building text processing applications. We start with an introduction to the basic vocabulary along with a work?ow for building NLP applications. We use industry-grade NLP tools for cleaning and pre-processing text, automatic question and answer generation using linguistics, text embedding, text classifier, and building a chatbot. With each project, you will learn a new concept of NLP. You will learn about entity recognition, part of speech tagging and dependency parsing for Q and A. We use text embedding for both clustering documents and making chatbots, and then build classifiers using scikit-learn. We conclude by deploying these models as REST APIs with Flask. By the end, you will be confident building NLP applications, and know exactly what to look for when approaching new challenges.
Table of Contents (10 chapters)

What this book covers

Chapter 1, Getting Started with Text Classification, introduces the reader to NLP and what a good NLP workflow looks like. You will also learn how to prepare text for machine learning with scikit-learn.

Chapter 2, Tidying Your Text, discusses some of the most common text pre-processing ideas. You will be introduced to spaCy and will learn how to use it for tokenization, sentence extraction, and lemmatization.

Chapter 3, Leveraging Linguistics, goes into a simple use case and examines how we can solve it. Then, we repeat this task again, but on a slightly different text corpus.

Chapter 4, Text Representations – Words to Numbers, introduces readers to the Gensim API. We will also learn to load pre-trained GloVe vectors and to use these vector representations instead of TD-IDF in any machine learning model.

Chapter 5, Modern Methods for Classification, looks at several new ideas regarding machine learning. The intention here is to demonstrate some of the most common classifiers. We will also learn about concepts such as sentiment analysis, simple classifiers, and how to optimize them for your datasets and ensemble methods.

Chapter 6, Deep Learning for NLP, cover what deep learning is, how it differs from what we have seen, and the key ideas in any deep learning model. We will also look at a few topics regarding PyTorch, how to tokenize text, and what recurrent networks are.

Chapter 7, Building Your Own Chatbot, explains why chatbots should be built and figures out the correct user intent. We will also learn in detail about intent , response, templates, and entities.

Chapter 8, Web Deployments, explains how to train a model and write some neater utils for data I/O. We are going to build a predict function and expose it using a Flask REST endpoint.