Why Single Words Lose Meaning
How not bad differs from bad.
Why Single Words Lose Meaning is a free NLP Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the NLP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Words Standing Alone
So far you have treated text as a bag of single words. But meaning often lives in how words sit next to each other, not in any word alone.
The Bag-of-Words Blind Spot
A bag-of-words model throws away order. To it, the two sentences below are identical, even though they mean opposite things. 😮
a = sorted("this is not good".split())
b = sorted("good is not this".split())
print(a == b) # TrueNot Bad vs Bad
Think about a review that says not bad. The word bad alone looks negative, but the pair flips it to mildly positive.
Negation Gets Lost
When you count words one by one, the word not floats free. The model never learns which word it was actually negating.
tokens = "not bad".split()
print(tokens) # ['not', 'bad'] counted apartPhrases Carry Meaning
Real language is full of phrases like new york or machine learning. Split them up and you lose the concept they name together.
Order Changes Everything
Compare dog bites man with man bites dog. Same three words, very different news. Order is signal, and single words discard it.
Enter the N-Gram
An n-gram is a short, contiguous run of n words. It is the simplest way to glue neighbors together and keep a little local context.
Unigrams You Already Know
A single word is just a unigram, an n-gram of size one. So bag-of-words was secretly an n-gram model all along.
text = "not bad at all"
unigrams = text.split()
print(unigrams)Pairs Rescue Context
Step up to size two and not bad becomes a single feature. Now the model can learn that this pair leans positive.
A Sliding Window
Picture a small window sliding along the text, one step at a time, grabbing every adjacent group of words it passes over.
Context, Not Grammar
N-grams do not understand grammar. They simply preserve which words appear together, and that small clue boosts many NLP tasks.
Quick Check
Why do plain single-word features struggle with a phrase like not bad?
Recap: Why Pairs Matter
Single words ignore order, so negation and phrases slip away. N-grams keep neighbors together and bring local context back. Next you will name them. ✨
Frequently asked questions
Is the “Why Single Words Lose Meaning” lesson free?
Yes — the full text of “Why Single Words Lose Meaning” is free to read here on the web, and the NLP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the NLP Academy course, upgrade to CoddyKit PRO.
What will I learn in “Why Single Words Lose Meaning”?
How not bad differs from bad. You practise NLP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start NLP Academy?
No prior experience is required. NLP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Why Single Words Lose Meaning” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this NLP Academy lesson?
Yes. Every NLP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Why Single Words Lose Meaning
- Bigrams and Trigrams Explained
- N-Gram Features in scikit-learn
- Choosing the Right N-Gram Range