0Pricing
NLP Academy · Lección

Por qué las palabras aisladas pierden significado

Cómo not bad se diferencia de bad

Por qué las palabras aisladas pierden significado es una lección gratuita de NLP Academy en CoddyKit. Esta es la lección 1 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de NLP Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de NLP Academy incluye 4 lecciones en total.

Partes de esta lección aún no han sido traducidas y se muestran en inglés.

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

Not 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 apart

Phrases 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. ✨

Preguntas frecuentes

¿La lección «Por qué las palabras aisladas pierden significado» es gratis?

Sí — el texto completo de «Por qué las palabras aisladas pierden significado» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de NLP Academy, actualiza a CoddyKit PRO. El curso de NLP Academy incluye 4 lecciones en total.

¿Qué aprenderé en «Por qué las palabras aisladas pierden significado»?

Cómo not bad se diferencia de bad Practicas NLP Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.

¿Necesito experiencia previa para empezar NLP Academy?

No se requiere experiencia previa. NLP Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 1 de 4.

¿Cuánto tiempo toma la lección «Por qué las palabras aisladas pierden significado»?

La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.

¿Puedo escribir y ejecutar código en esta lección de NLP Academy?

Sí. Cada lección de NLP Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.

Todas las lecciones de este curso

  1. Por qué las palabras aisladas pierden significado
  2. Bigramas y trigramas explicados
  3. Características de N-gramas en scikit-learn
  4. Elección del intervalo adecuado de N-gramas
← Volver a NLP Academy