Why Models Need Numbers, Not Words
The leap from text to vectors.
Why Models Need Numbers, Not Words 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.
Machines Speak Numbers
A model cannot do math on the word cat. Every algorithm under the hood only understands numbers, so text must be converted first.
The Core Problem
Your goal is to turn each document into a row of numbers, a vector, that captures what the text contains.
Words Have No Order Value
You cannot say cat is greater than dog. Words are categories, not quantities, so raw text has no numeric meaning to compute on.
From Text to Vectors
This conversion from words into number arrays is called vectorization. It is the bridge between language and machine learning.
Counting Is the Simplest Bridge
The easiest vector is just how many times each word appears. This count-based idea is the heart of bag-of-words. 🛍️
Why Bag Of Words
It is a bag because order is thrown away. You keep which words appear and how often, but not the sequence they came in.
A Tiny Example
Imagine two reviews. We can score each by counting good and bad to get a simple numeric representation of its tone.
docs = ["food was good good", "service was bad"]Same Length for Every Row
Every document becomes a vector of the same length, one slot per known word, so a model can compare rows directly.
Missing Words Are Zero
If a word never appears in a document, its slot is simply zero. Most slots end up zero, which makes these vectors sparse.
Numbers Unlock Algorithms
Once text is numeric, every classic tool works: distance, similarity, and classifiers all operate on these vectors.
Meaning Is Approximate
Counts ignore grammar and word order, so bag-of-words is a rough but surprisingly strong baseline for many tasks.
Quick Check
Why must text be converted before modeling?
Recap: Text Becomes Numbers
You saw why models need vectors, met bag-of-words, and learned that word counts turn documents into numbers a model can read. 🎉
Frequently asked questions
Is the “Why Models Need Numbers, Not Words” lesson free?
Yes — the full text of “Why Models Need Numbers, Not Words” 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 Models Need Numbers, Not Words”?
The leap from text to vectors. 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 Models Need Numbers, Not Words” 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 Models Need Numbers, Not Words
- Building a Vocabulary
- Counting With CountVectorizer
- Reading the Document-Term Matrix