0PricingLogin
NLP Academy · Lesson

Why Single Words Lose Meaning

How not bad differs from bad.

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)  # True

All lessons in this course

  1. Why Single Words Lose Meaning
  2. Bigrams and Trigrams Explained
  3. N-Gram Features in scikit-learn
  4. Choosing the Right N-Gram Range
← Back to NLP Academy