Book Image

Natural Language Understanding with Python

By : Deborah A. Dahl
5 (1)
Book Image

Natural Language Understanding with Python

5 (1)
By: Deborah A. Dahl

Overview of this book

Natural Language Understanding facilitates the organization and structuring of language allowing computer systems to effectively process textual information for various practical applications. Natural Language Understanding with Python will help you explore practical techniques for harnessing NLU to create diverse applications. with step-by-step explanations of essential concepts and practical examples, you’ll begin by learning about NLU and its applications. You’ll then explore a wide range of current NLU techniques and their most appropriate use-case. In the process, you’ll be introduced to the most useful Python NLU libraries. Not only will you learn the basics of NLU, you’ll also discover practical issues such as acquiring data, evaluating systems, and deploying NLU applications along with their solutions. The book is a comprehensive guide that’ll help you explore techniques and resources that can be used for different applications in the future. By the end of this book, you’ll be well-versed with the concepts of natural language understanding, deep learning, and large language models (LLMs) for building various AI-based applications.
Table of Contents (21 chapters)
1
Part 1: Getting Started with Natural Language Understanding Technology
4
Part 2:Developing and Testing Natural Language Understanding Systems
16
Part 3: Systems in Action – Applying Natural Language Understanding at Scale

Comparing three text classification methods

One of the most useful things we can do with evaluation techniques is to decide which of several approaches to use in an application. Are the traditional approaches such as term frequency - inverse document frequency (TF-IDF), support vector machines (SVMs), and conditional random fields (CRFs) good enough for our task, or will it be necessary to use deep learning and transformer approaches that have better results at the cost of longer training time?

In this section, we will compare the performance of three approaches on a larger version of the movie review dataset that we looked at in Chapter 9. We will look at using a small BERT model, TF-IDF vectorization with the Naïve Bayes classification, and a larger BERT model.

A small transformer system

We will start by looking at the BERT system that we developed in Chapter 11. We will use the same BERT model as in Chapter 11, which is one of the smallest BERT models, small_bert/bert_en_uncased_L...