How AI Understands Language Natural Language Processing Basics
Lesson 10 • Grades 6–10 • Evolve AI Institute
Background image suggestion: Digital brain with language symbols/words flowing
2 The Language Challenge
Can you figure out what this means?
“I saw her duck”
Two possible meanings:
I saw her pet duck (the bird)
I saw her duck down (lower herself)
Why is this confusing for computers?
Same words, different meanings
Requires context to understand
Humans use common sense—computers don’t have that!
3 More Tricky Sentences
Which meaning is correct?
“Time flies like an arrow; fruit flies like a banana”
“The old man the boats”
“I’ll call you back on my cell”
The Problem: Language is full of:
Multiple meanings
Context dependencies
Idioms and expressions
Sarcasm and tone
4 What is Natural Language Processing?
Definition: Natural Language Processing (NLP) is a branch of Artificial Intelligence that helps computers understand, interpret, and generate human language.
The Goal: Enable computers to process language the way humans do—but computers need step-by-step instructions for what comes naturally to us!
Key Challenge: Teaching computers to handle the complexity, ambiguity, and nuance of human language.
Visual: Brain icon + Computer icon with arrows between them
5 NLP in Your Daily Life
You use NLP all the time!
Voice Assistants – Siri, Alexa, Google Assistant
Chatbots – Customer service, help desks
Translation – Google Translate, language apps
Email Filters – Spam detection
Autocorrect – Fixing typos as you type
Emoji Suggestions – Based on your text
Subtitles – Auto-generated captions
Search Engines – Understanding what you’re looking for
6 Key Concept #1 – Tokenization
Breaking text into pieces
What is it? Splitting text into individual words or meaningful units (called “tokens”)
Example:
“I love AI education!”
Becomes → [“I”, “love”, “AI”, “education”, “!”]
Why it matters:
First step in understanding text
Computers process one token at a time
Helps identify word boundaries and punctuation
7 Tokenization Challenges
It’s not always simple!
Challenge 1 – Contractions: “Don’t” → [“Do”, “n’t”] or [“Don’t”]?
What is it? Labeling each word as a noun, verb, adjective, adverb, etc.
Example: “The quick brown fox jumps over the lazy dog”
The (Determiner) • quick (Adjective) • brown (Adjective) • fox (Noun)
jumps (Verb) • over (Preposition) • the (Determiner) • lazy (Adjective) • dog (Noun)
Why it matters: Understanding sentence structure helps AI grasp meaning
9 POS Tagging Gets Tricky!
The same word can be different parts of speech:
“I like chocolate” (verb)
“It’s like a dream” (preposition)
“Click the Like button” (noun)
How does AI decide?
Looks at surrounding words (context)
Uses patterns learned from millions of examples
Considers sentence structure rules
10 Key Concept #3 – Named Entity Recognition (NER)
Finding important names and terms
What is it? Identifying and categorizing key information:
PERSON – Names of people
LOCATION – Cities, countries, places
ORGANIZATION – Companies, institutions
DATE/TIME – When things happen
MONEY – Currency amounts
NUMBERS – Quantities, percentages
Example: “Apple was founded by Steve Jobs in Cupertino in 1976”
Apple (ORGANIZATION) • Steve Jobs (PERSON) • Cupertino (LOCATION) • 1976 (DATE)
11 Why NER Matters
Real-world applications:
News Analysis – Automatically organize articles by people, places, and organizations; create summaries with key facts
Search Engines – Understand what you’re searching for; show relevant results
Voice Assistants – “Call John Smith” (recognizes person’s name); “What’s the weather in Boston?” (recognizes location)
Business Intelligence – Extract key information from documents; track mentions of companies and products
12 Key Concept #4 – Sentiment Analysis
Understanding emotions in text
What is it? Determining whether text expresses positive, negative, or neutral feelings.
Examples:
“This movie is amazing!” (POSITIVE)
“Worst pizza ever!” (NEGATIVE)
“The package arrived on Tuesday” (NEUTRAL)
Why it matters:
Companies track customer satisfaction
Social media monitors public opinion
Products get feedback analysis
13 Sentiment Analysis Challenges
It’s not always obvious!
Challenge #1 – Sarcasm: “Oh great, another rainy day” – Contains word “great” (positive) but meaning is negative!
Challenge #2 – Mixed Emotions: “The food was delicious but the service was terrible” – Both positive AND negative
Challenge #3 – Context Matters: “This movie is sick!” – In slang, “sick” means “awesome”!
AI is getting better, but still struggles with: Sarcasm and irony, cultural context, and subtle emotional nuances.
14 Key Concept #5 – Semantic Analysis
Understanding actual meaning
What is it? Going beyond individual words to understand relationships between words, overall meaning of sentences, and context and intent.
Example: “Can you open the window?”
Not just asking about your ability – it’s a polite request to open the window!
Semantic analysis helps AI:
Understand commands and questions
Respond appropriately
Grasp implied meaning
15 Semantic Analysis in Action
Understanding context changes everything:
“The bank is closed” – Is it a financial institution or a river bank?
AI looks at context:
“I need to deposit money. The bank is closed.” → Context = financial institution
“We’re fishing by the stream. The bank is muddy.” → Context = river bank
This is called Word Sense Disambiguation – figuring out which meaning of a word is being used.
16 How NLP Systems Work
The Process:
Input – Text or speech
Preprocessing – Clean and format data
Tokenization – Break into words
POS Tagging – Label word types
Named Entity Recognition – Find key information
Syntax Analysis – Understand sentence structure
Semantic Analysis – Understand meaning
Output – Response, translation, classification, etc.
Visual: Flowchart showing these steps with arrows
17 NLP Application – Chatbots
Conversational AI
How chatbots use NLP:
User types a message
NLP analyzes the text (what is the user asking?)
Intent recognition (what do they want?)
Entity extraction (specific details)
Generate appropriate response
Continue conversation with context
Examples: Customer service bots, virtual assistants, educational tutors, health information bots
Limitations: May not understand complex questions; struggles with context over long conversations; can’t handle all types of requests.
18 NLP Application – Translation
Breaking down language barriers
How machine translation works:
Analyze source language sentence structure
Identify words and their meanings
Find equivalent words in target language
Reconstruct sentence following target language rules
Review and adjust for natural flow
Challenges:
Idioms don’t translate literally (“It’s raining cats and dogs”)
Grammar structures differ between languages
Cultural context gets lost
Formal vs. informal language
Modern approach: Neural machine translation learns patterns from millions of examples!
19 NLP Application – Voice Assistants
Talking to technology
The process:
Speech Recognition – Convert audio to text
NLP Analysis – Understand the command
Intent & Entity Extraction – What do you want to do?
Action – Execute the command
Response Generation – Create an answer
Text-to-Speech – Speak the response
Example: “Hey Siri, set a timer for 10 minutes”
Intent: Set timer • Entity: 10 minutes • Action: Start countdown • Response: “Timer set for 10 minutes”
20 NLP Application – Content Moderation
Keeping online spaces safe
How NLP helps:
Detect hate speech and bullying
Identify spam and scams
Flag inappropriate content
Filter out harmful material
Process:
Analyze text content
Check for harmful keywords and patterns
Use sentiment analysis (is it aggressive?)
Context analysis (is it a joke or serious?)
Flag for human review if needed
Challenges: False positives (flagging innocent content), missing subtle threats, different cultural contexts, evolving language (new slang).
21 Real-World NLP: Social Media
Understanding billions of messages
Trending Topics – Identify what people are talking about; track hashtags and popular phrases
Targeted Advertising – Analyze interests from posts; show relevant ads
Emoji Suggestions – Predict which emoji fits your text
Auto-captions – Generate descriptions for images; create video subtitles
Safety Features – Detect cyberbullying; flag self-harm content; remove spam
22 Real-World NLP: Healthcare
AI helping doctors and patients
Medical Records – Extract key information from doctor’s notes; organize patient data
Symptom Analysis – Chatbots ask about symptoms; suggest possible conditions (not a replacement for doctors!)
Drug Information – Process medical research papers; identify drug interactions
Patient Communication – Translate medical terms to simple language; answer common health questions
Research – Analyze thousands of medical studies; find patterns in patient outcomes