An introduction to natural language processing with Python using spaCy, a leading Python natural language processing library.
Natural Language Processing with Python and spaCy will show you how to create NLP applications like chatbots, text-condensing scripts, and order-processing tools quickly and easily. You'll learn how to leverage the spaCy library to extract meaning from text intelligently; how to determine the relationships between words in a sentence (syntactic dependency parsing); identify nouns, verbs, and other parts of speech (part-of-speech tagging); and sort proper nouns into categories like people, organizations, and locations (named entity recognizing). You'll even learn how to transform statements into questions to keep a conversation going.
You'll also learn how to:
• Work with word vectors to mathematically find words with similar meanings (Chapter 5)
• Identify patterns within data using spaCy's built-in displaCy visualizer (Chapter 7)
• Automatically extract keywords from user input and store them in a relational database (Chapter 9)
• Deploy a chatbot app to interact with users over the internet (Chapter 11)
"Try This" sections in each chapter encourage you to practice what you've learned by expanding the book's example scripts to handle a wider range of inputs, add error handling, and build professional-quality applications.
By the end of the book, you'll be creating your own NLP applications with Python and spaCy.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on guide to building practical NLP applications with Python and spaCy, from basic text processing to a deployed chatbot. Best for Python developers who want working NLP skills without deep machine learning theory.
【Book Arc】
- **Opening (~0%–10%)**: Introduces what NLP is, how machine learning generates the statistical models behind libraries like spaCy, and the core tasks an NLP developer faces (parsing, tagging, entity recognition).
- **Early (~10%–30%)**: Gets you running spaCy: setting up the environment, loading models, and understanding the text-processing pipeline (tokenization, lemmatization, POS tagging, dependency parsing, NER), plus spaCy's container objects and customization.
- **Middle (~30%–50%)**: Turns linguistic features into application logic—extracting and generating text with POS tags, transforming statements into questions for chatbots, and using word vectors to measure semantic similarity.
- **Late (~50%–75%)**: Moves into pattern-finding and dependency-tree walking, visualizations with displaCy, and intent recognition for understanding user input.
- **Ending (~75%–100%)**: Applies everything to keyword extraction stored in a relational database and deploying a chatbot over the internet (per the book's chapter list; excerpts do not cover these final chapters in detail).
【Key Takeaways】
- **The processing pipeline is the backbone of spaCy** (Early): tokenization, lemmatization, POS tagging, dependency parsing, and NER run in sequence, and spaCy handles them behind the scenes so you focus on application logic.
- **Linguistic features drive real applications** (Middle): POS tags and dependency labels let you extract specific information and generate relevant text—the basis for question-asking chatbots and phrase location.
- **Dependency parsing reveals intent** (Early): ROOT marks the main verb and pobj marks the key entity; together they can summarize an utterance's meaning for intent recognition.
- **Word vectors enable semantic similarity** (Middle): spaCy's similarity() method compares container objects (Doc, Span, Token) on a 0–1 scale, letting you classify texts by topic and find words with similar meanings.
- **Statements can be turned into questions** (Middle): by locating the direct object and its syntactic children, a chatbot can generate confirmatory questions to sustain conversation.
- **Multi-word entities need custom handling** (Early): span.merge() retokenizes names like "Golden Gate Bridge" into single tokens, and entity labels can be customized (e.g., reclassifying a city as a district).
- **Performance matters at scale** (Early): Cython extension modules and large corpora (e.g., Wikipedia dumps) are used to measure and optimize processing speed.
- **Every chapter includes "Try This" practice** (throughout): expanding example scripts to handle more inputs, add error handling, and build professional-quality applications.
【Reading Tips】
- Deep-read Chapters 2–4 for the pipeline and linguistic features—they underpin everything later; skim Chapter 1 if you already know NLP basics.
- Type out and run the code examples rather than just reading; spaCy's behavior (tokenization, dependency labels) is best understood by inspecting actual output.
- Pay attention to the "Try This" sections—they turn passive reading into skill-building and preview real-world edge cases.
- Treat Chapter 5 (word vectors) as a conceptual pivot: understand similarity scoring before tackling later application chapters.
- If you only want a chatbot, focus on Chapters 4, 6, 8, and 11; if you want text analysis, prioritize Chapters 5, 7, and 9.
【Coverage Limits】
This guide is based on stratified excerpts covering roughly the first half of the book; the final chapters on visualization, intent recognition, database storage, and deployment are described from the table of contents and blurb rather than detailed excerpt content.
Page 6
ees Chapter 7: Visualizations Chapter 8: Intent Recognition Chapter 9: Storing User Input in a Database Chapter 10: Training Models Chapter 11: Deploying You...
ne The processing pipeline typically includes tokenization, lemmatization, part-of-speech tagging, syntactic dependency parsing, and named entity recognition...
his default behavior: >>> span = doc[1:4] >>> lem_id = doc.vocab.strings[span.text] >>> span.merge(lemma = lem_id) Golden Gate Bridge In this example, we cre...
emantic similarity of different texts, which will allow you to, for example, classify those texts based on the topics they cover. You’ll start by taking a co...
after all the checks have occurred and no mismatch has been detected, the function returns True ➌. To test the patterns, we apply the pipeline to a sentence,...
to a single word. You could use this structure as an intent identifier in a later part of a program, as in the following code fragment: intent = extrac...
ng Information productptypequantity pizza 2 The value of the ptype field is missing because the user didn’t identify the type of pizza they want. To address...
_intent(), which should take a single parameter—the text of a user’s message as a Doc object (be sure to exclude the line of code with the hardcoded utteranc...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Natural Language Processing with Python and spaCy A Practical Introduction (Yuli Vasiliev) (Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Natural Language Processing with Python and spaCy A Practical Introduction (Yuli Vasiliev) (Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment