Class 7 · Unit 2: Domains of AI · Lesson 2.3 · 40 min
Natural language processing — how machines handle words
The phone translates the guest's message into Urdu and Hindi — but not into Kashmiri, the language Grandmother speaks. Why?
Today you will: Split a paragraph into tokens and count them · Predict the next word like a language model · Explain why some languages get weaker tools
Story
Bilal's uncle runs a houseboat on Dal Lake. A guest sends him a message in English: "Can we get breakfast at 7 and a shikara at 8?"
His uncle reads it easily. But when his aunt, who speaks only Kashmiri, asks the phone to translate it for her, the phone offers Urdu and Hindi, but not Kashmiri.
Hiba: “Why can a phone speak English perfectly, but not the language our grandmother speaks?”
How does a machine handle language at all, and why is it better at some languages than others?
Watch
How machines read — — scan code 7.2.3 in the printed book.
Warm up your fingers
Skill: numbers and the symbols above them (7 min)
- On typing.com, open the lesson on number-row symbols.
- Practise the Shift key with
!()=. - Then type this sentence twice, with care:
Breakfast at 7, shikara at 8!
On the laptop
You need: LibreOffice Calc · word-count.ods (a Dal Lake paragraph, one word per row) · Semantris (teacher demo, no account)
Mission 1: Be a word counter (pairs, 10 min)
- ☐1
Open
word-count.ods. Column A is the paragraph split into single words — that's tokenising. - ☐2
Predict: which word will be the most common? Write it in E1.
- ☐3
Type
thein C1, and=COUNTIF(A:A;C1)in D1. Trylake,boat,water,snow. - ☐4
Which word wins? Is it an important word or a small one?
- ☐5
In C3 type a word; in D3 the word you think comes after it most often. Check column A. You just predicted like a language model.
Mission 2: Semantris (whole class, 8 min)
- ☐6
The teacher opens Semantris (research.google.com/semantris) → Arcade. The class calls out clue words; the teacher types them.
- ☐7
Watch which word the AI thinks is most related. Why did snow go with cold and not white?
No laptop today?
Cut a printed paragraph into single words. Pile up matching words, count them, and write the top 5. Then play Next word: one child reads the start of a sentence, everyone writes the next word. Did most of you choose the same one?
Now you know
- NLP (natural language processing) helps machines understand and produce language — text and speech.
- Tokens are words or bits of words. Machines count them and notice which come together.
- Predicting the next word is how many NLP tools work, learned from many example sentences.
- The text it learned from decides how good it is. Little text online — like Kashmiri — means weaker tools.
- Used in translation, voice assistants, chatbots, spam filters, autocomplete.
Debate it
Kashmiri is spoken by millions of people, but there is far less of it online than English.
If there are no good Kashmiri AI tools, who loses out? What could people in Kashmir do to help machines learn their language, and what would they need to be careful about?
Check yourself — practice, not a test
1. What does NLP stand for?
- ○ New Learning Program
- ○ Natural Language Processing
- ○ Network Link Protocol
- ○ Next Letter Prediction
2. Many NLP tools work by predicting the next word from lots of example sentences.
- ○ True
- ○ False
3. Why is a machine usually better at English than at Kashmiri?
- ○ English words are shorter
- ○ It has learned from far more English text
- ○ Kashmiri has no grammar
- ○ Computers are made in English
4. Which of these use NLP? (choose all)
- ○ Autocomplete on a phone keyboard
- ○ A translator app
- ○ A digital thermometer
- ○ A spam filter for emails
Remember
NLP breaks language into pieces, finds the patterns and predicts. It is only as good as the text it learned from.