2nd Edition. — Manning Publications, 2025. — 688 p. — ISBN 978-1617299445.
Develop your NLP skills from scratch, with an open source toolbox of Python packages, Transformers, Hugging Face, vector databases, and your own Large Language Models.Natural Language Processing in Action, Second Edition has helped thousands of data scientists build machines that understand human language. In this
new and revised edition, you’ll discover
state-of-the art Natural Language Processing (NLP) models like BERT and HuggingFace transformers, popular open-source frameworks for chatbots, and more. You’ll create NLP tools that can detect
fake news, filter spam, deliver exceptional search results and even build truthfulness and reasoning into Large Language Models (LLMs).
In [b]Natural Language Processing in Action, Second Edition you will learn how to:[/b]
Process, analyze, understand, and generate natural language text.
Build production-quality NLP pipelines with spaCy.
Build neural networks for NLP using Pytorch.
BERT and GPT transformers for English composition, writing code, and even organizing your thoughts.
Create chatbots and other conversational AI agents.
In this new and revised edition, you’ll discover state-of-the art NLP models like BERT and HuggingFace transformers, popular open-source frameworks for chatbots, and more. Plus, you’ll discover
vital skills and techniques for optimizing LLMs including conversational design, and automating the “trial and error” of LLM interactions for effective and accurate results.
About the technologyFrom nearly human chatbots to ultra-personalized business reports to AI-generated email, news stories, and novels, natural language processing (NLP) has never been more powerful! Groundbreaking advances in deep learning have made high-quality open source models and powerful NLP tools like spaCy and PyTorch widely available and ready for production applications. This book is your entrance ticket—and backstage pass—into the next generation of natural language processing.
About the bookNatural Language Processing in Action, Second Edition introduces the foundational technologies and state-of-the-art tools you’ll need to write and publish NLP applications. You learn how to create custom models for search, translation, writing assistants, and more, without relying on big commercial foundation models. This fully updated second edition includes coverage of BERT, Hugging Face transformers, fine-tuning large language models, and more.
What's insideNLP pipelines with spaCy.
Neural networks with PyTorch.
BERT and GPT transformers.
Conversational design for chatbots.
About the readerFor intermediate Python programmers familiar with deep learning basics.
About the authorHobson Lane is a data scientist and machine learning engineer with over twenty years of experience building autonomous systems and NLP pipelines. Maria Dyshel is a social entrepreneur and artificial intelligence expert, and the CEO and cofounder of Tangible AI.
Cole Howard and Hannes Max Hapke were co-authors of the first edition.
Table fo ContentsPart 1Machines that read and write: A natural language processing overview
Tokens of thought: Natural language words
Math with words: Term frequency–inverse document frequency vectors
Finding meaning in word counts: Semantic analysis
Part 2Word brain: Neural networks
Reasoning with word embeddings
Finding kernels of knowledge in text with CNNs
Reduce, reuse, and recycle your words: RNNs and LSTMs
Part 3Stackable deep learning: Transformers
Large language models in the real world
Information extraction and knowledge graphs
Getting chatty with dialog engines
A Your NLP tools
B Playful Python and regular expressions
C Vectors and linear algebra
D Machine learning tools and techniques
E Deploying NLU containerized microservices
F Glossary