
Python Natural Language Processing Cookbook
Over 60 recipes for building powerful NLP solutions using Python and LLM libraries
Packt Publishing
2nd Edition
Published on 13. September 2024
Book
Paperback/Softback
312 pages
978-1-80324-574-4 (ISBN)
Description
Updated to include three new chapters on transformers, natural language understanding (NLU) with explainable AI, and dabbling with popular LLMs from Hugging Face and OpenAI
Key Features
Leverage ready-to-use recipes with the latest LLMs, including Mistral, Llama, and OpenAI models
Use LLM-powered agents for custom tasks and real-world interactions
Gain practical, in-depth knowledge of transformers and their role in implementing various NLP tasks with open-source and advanced LLMs
Purchase of the print or Kindle book includes a free PDF eBook
Book DescriptionHarness the power of Natural Language Processing (NLP) to overcome real-world text analysis challenges with this recipe-based roadmap written by two seasoned NLP experts with vast experience transforming various industries with their NLP prowess.
You'll be able to make the most of the latest NLP advancements, including large language models (LLMs), and leverage their capabilities through Hugging Face transformers. Through a series of hands-on recipes, you'll master essential techniques such as extracting entities and visualizing text data. The authors will expertly guide you through building pipelines for sentiment analysis, topic modeling, and question-answering using popular libraries like spaCy, Gensim, and NLTK. You'll also learn to implement RAG pipelines to draw out precise answers from a text corpus using LLMs.
This second edition expands your skillset with new chapters on cutting-edge LLMs like GPT-4, Natural Language Understanding (NLU), and Explainable AI (XAI)-fostering trust in your NLP models.
By the end of this book, you'll be equipped with the skills to apply advanced text processing techniques, use pre-trained transformer models, build custom NLP pipelines to extract valuable insights from text data to drive informed decision-making.What you will learn
Understand fundamental NLP concepts along with their applications using examples in Python
Classify text quickly and accurately with rule-based and supervised methods
Train NER models and perform sentiment analysis to identify entities and emotions in text
Explore topic modeling and text visualization to reveal themes and relationships within text
Leverage Hugging Face and OpenAI LLMs to perform advanced NLP tasks
Use question-answering techniques to handle both open and closed domains
Apply XAI techniques to better understand your model predictions
Who this book is forThis updated edition of the Python Natural Language Processing Cookbook is for data scientists, machine learning engineers, and developers with a background in Python. Whether you're looking to learn NLP techniques, extract valuable insights from textual data, or create foundational applications, this book will equip you with basic to intermediate skills. No prior NLP knowledge is necessary to get started. All you need is familiarity with basic programming principles. For seasoned developers, the updated sections offer the latest on transformers, explainable AI, and Generative AI with LLMs.
Key Features
Leverage ready-to-use recipes with the latest LLMs, including Mistral, Llama, and OpenAI models
Use LLM-powered agents for custom tasks and real-world interactions
Gain practical, in-depth knowledge of transformers and their role in implementing various NLP tasks with open-source and advanced LLMs
Purchase of the print or Kindle book includes a free PDF eBook
Book DescriptionHarness the power of Natural Language Processing (NLP) to overcome real-world text analysis challenges with this recipe-based roadmap written by two seasoned NLP experts with vast experience transforming various industries with their NLP prowess.
You'll be able to make the most of the latest NLP advancements, including large language models (LLMs), and leverage their capabilities through Hugging Face transformers. Through a series of hands-on recipes, you'll master essential techniques such as extracting entities and visualizing text data. The authors will expertly guide you through building pipelines for sentiment analysis, topic modeling, and question-answering using popular libraries like spaCy, Gensim, and NLTK. You'll also learn to implement RAG pipelines to draw out precise answers from a text corpus using LLMs.
This second edition expands your skillset with new chapters on cutting-edge LLMs like GPT-4, Natural Language Understanding (NLU), and Explainable AI (XAI)-fostering trust in your NLP models.
By the end of this book, you'll be equipped with the skills to apply advanced text processing techniques, use pre-trained transformer models, build custom NLP pipelines to extract valuable insights from text data to drive informed decision-making.What you will learn
Understand fundamental NLP concepts along with their applications using examples in Python
Classify text quickly and accurately with rule-based and supervised methods
Train NER models and perform sentiment analysis to identify entities and emotions in text
Explore topic modeling and text visualization to reveal themes and relationships within text
Leverage Hugging Face and OpenAI LLMs to perform advanced NLP tasks
Use question-answering techniques to handle both open and closed domains
Apply XAI techniques to better understand your model predictions
Who this book is forThis updated edition of the Python Natural Language Processing Cookbook is for data scientists, machine learning engineers, and developers with a background in Python. Whether you're looking to learn NLP techniques, extract valuable insights from textual data, or create foundational applications, this book will equip you with basic to intermediate skills. No prior NLP knowledge is necessary to get started. All you need is familiarity with basic programming principles. For seasoned developers, the updated sections offer the latest on transformers, explainable AI, and Generative AI with LLMs.
More details
Edition
2nd Revised edition
Language
English
Place of publication
Birmingham
United Kingdom
Target group
Professional and scholarly
US School Grade: College Graduate Student
Edition type
Revised edition
Dimensions
Height: 235 mm
Width: 191 mm
Thickness: 17 mm
Weight
586 gr
ISBN-13
978-1-80324-574-4 (9781803245744)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Other editions
Additional editions

Zhenya Antic | Saurabh Chakravarty | Edward A. Fox
Python Natural Language Processing Cookbook
Over 60 recipes for building powerful NLP solutions using Python and LLM libraries
E-Book
03/2025
2nd Edition
Packt Publishing
from
€26.99
Available for download
Persons
Zhenya Antic, Ph.D. is an expert in AI and NLP. She is currently the Director of AI Automation at Arch Insurance, where she leads initiatives in Intelligent Document Processing and applies various AI solutions to complex problems. With extensive consulting experience, Zhenya has worked on numerous NLP projects with various companies. She holds a Ph.D. in Linguistics from the University of California, Berkeley, and a B.S. in Computer Science from the Massachusetts Institute of Technology. Saurabh Chakravarty, Ph.D. is a seasoned veteran in the software industry with over 20 years of
experience in software development. A software developer at heart, he is passionate about programming.
He has held various roles, including architect, lead engineer, and software developer, specializing in AI
and large-scale distributed systems. Saurabh has worked with Microsoft, Rackspace, and Accenture,
as well as with a few startups. He holds a Ph.D. in Computer Science with a specialization in NLP
from Virginia Tech, USA. Saurabh lives in California with his wife, Tina, and daughter, Aaliya, and
works for AWS in Santa Clara, California.
experience in software development. A software developer at heart, he is passionate about programming.
He has held various roles, including architect, lead engineer, and software developer, specializing in AI
and large-scale distributed systems. Saurabh has worked with Microsoft, Rackspace, and Accenture,
as well as with a few startups. He holds a Ph.D. in Computer Science with a specialization in NLP
from Virginia Tech, USA. Saurabh lives in California with his wife, Tina, and daughter, Aaliya, and
works for AWS in Santa Clara, California.
Content
Table of Contents
Learning NLP Basics
Playing with Grammar
Representing Text - Capturing Semantics
Classifying Texts
Getting Started with Information Extraction
Topic Modeling
Visualizing Text Data
Transformers and Their Applications
Natural Language Understanding
Generative AI and Large Language Models
Learning NLP Basics
Playing with Grammar
Representing Text - Capturing Semantics
Classifying Texts
Getting Started with Information Extraction
Topic Modeling
Visualizing Text Data
Transformers and Their Applications
Natural Language Understanding
Generative AI and Large Language Models