0Pricing
NLP Academy · Lektion

Wortmathematik: King minus Man plus Woman

Analogien und nächste Nachbarn erkunden

Wortmathematik: King minus Man plus Woman ist eine kostenlose NLP Academy-Lektion auf CoddyKit. Dies ist Lektion 4 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des NLP Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der NLP Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

Vectors Have Directions

Because words are now vectors, you can add and subtract them like arrows. This unlocks a playful idea called word math.

The Famous Example

Take king, subtract man, add woman, and the nearest vector is queen. This analogy stunned researchers when it first appeared. 👑

result = emb["king"] - emb["man"] + emb["woman"]
# nearest word -> "queen"

Why It Works

The step from man to woman is a consistent direction in space. Adding that same direction to king lands you near queen.

Relationships as Offsets

Many relations become repeatable vector offsets. The gap encoding gender or tense behaves like a fixed arrow across word pairs.

More Analogies

The trick generalizes nicely. Paris minus France plus Italy lands near Rome, capturing a capital-city relationship.

r = emb["paris"] - emb["france"] + emb["italy"]
# nearest word -> "rome"

Finding the Answer

You compute the target vector, then search for its nearest neighbor among all word vectors using cosine similarity.

One Line in Gensim

gensim wraps the whole analogy in a single call. You list positive and negative words and read the top result.

model.most_similar(positive=["king", "woman"],
                   negative=["man"], topn=1)

Nearest Neighbors

Even without subtraction, you can ask which words sit closest to one term. These neighbors reveal what the model thinks is similar.

It Is Not Perfect

Analogies often work, but not always. Bias in the training text can produce unfair or wrong results, so stay critical.

Bias Lives in Vectors

Embeddings absorb the stereotypes present in their data. Always remember that bias in text becomes bias in your model.

Why This Amazes People

Simple arithmetic on learned vectors reflects real human relationships. That is the clearest sign embeddings truly capture meaning. ✨

Quick Check

What does king minus man plus woman tend to produce?

Recap

Word math adds and subtracts vectors to solve analogies like king to queen. It shows embeddings encode real relationships, bias and all. ✅

Häufig gestellte Fragen

Ist die Lektion „Wortmathematik: King minus Man plus Woman“ kostenlos?

Ja — der vollständige Text von „Wortmathematik: King minus Man plus Woman“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des NLP Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der NLP Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Wortmathematik: King minus Man plus Woman“?

Analogien und nächste Nachbarn erkunden Du übst NLP Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um NLP Academy zu starten?

Keine Vorkenntnisse erforderlich. NLP Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 4 von 4.

Wie lange dauert die Lektion „Wortmathematik: King minus Man plus Woman“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser NLP Academy-Lektion Code schreiben und ausführen?

Ja. Jede NLP Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Von dünn besetzten Zählungen zu dichten Vektoren
  2. Wie word2vec Bedeutung lernt
  3. GloVe-Vektoren in Python laden
  4. Wortmathematik: King minus Man plus Woman
← Zurück zu NLP Academy