Majid Al-RaimiWhat words mean: lemmas, senses and synonymy

ICS 582Lecture 04Part 01

What words mean: lemmas, senses and synonymy

Why treating words as strings or logical symbols is unsatisfying, what lexical semantics asks of a theory of meaning, how lemmas split into senses, and why perfect synonymy probably does not exist.

Concepts
6
Slides
1-10
Reading
36 min
Understood
0/6 concepts

Why this part matters

Every vector model in this lecture, from raw counts to word2vec, is graded against the same exam: does it capture the relations between word meanings that linguists named long before anyone trained an embedding? This part writes that exam. It asks what a word means, how one word splits into several senses, and why two words almost never mean exactly the same thing.

The payoff is practical in three directions. Exams ask you to define sense and polysemy and to explain why water and H₂O are not perfect synonyms. In research, a static embedding gives mouse one vector that blends the rodent and the computer device, which is the core motivation for word sense disambiguation and for contextual embeddings. In real systems, a search engine that expands a query with synonyms can silently shift the sense or the register of what the user asked.

By the end you can

  1. Explain why vocabulary indices and logical symbols fail as meaning representations, using the one-hot dot product and the DOG example.
  2. Define lemma, wordform, sense and polysemy using the WordNet entry for mouse.
  3. State the truth-conditional definition of synonymy and test a candidate pair by substitution.
  4. Apply the principle of contrast to water and H₂O and similar pairs, naming the dimension (dialect, register or connotation) on which they differ.
  5. Distinguish synonymy, a relation between senses, from similarity, a graded relation between words, with examples.

Open the vocabulary file of an n-gram model. cat might be entry w_412, dog entry w_977 and spreadsheet entry w_3051. Ask the model which of those three words are alike and it has nothing to say. The numbers are positions in a list, and a list position carries no meaning: 412 is not closer in sense to 977 than to 3051.

Turning each index into a vector does not help. A one-hot vector has a single 1 at the word's index and zeros everywhere else. Two distinct words never share a non-zero position, so their dot product is always 0, whichever pair you pick:

ecat⋅edog=0=ecat⋅espreadsheet\mathbf{e}_{\text{cat}} \cdot \mathbf{e}_{\text{dog}} = 0 = \mathbf{e}_{\text{cat}} \cdot \mathbf{e}_{\text{spreadsheet}}
One-hot vectors make every pair of distinct words equally unlike

Jurafsky and Martin describe exactly this situation: in the n-gram models of Chapter 3 and in classical NLP applications, the only representation of a word is a string of letters or an index in a vocabulary list. A model trained on the cat sat learns nothing about the dog sat, because the two sentences share no symbol in the position that matters.

Four words as one-hot index boxes sit equally far apart; once they become points in a vector space, cat, dog and horse cluster while spreadsheet stays away

The logic class answer, and why it is circular

An introductory logic course offers a different answer: the meaning of dog is the predicate DOG, and the meaning of cat is CAT. Relations between meanings are then stated as axioms written by hand, for instance that every dog is a mammal:

∀x DOG(x)→MAMMAL(x)\forall x\, \mathrm{DOG}(x) \rightarrow \mathrm{MAMMAL}(x)

This is more expressive than an index, because the axioms support inference. But the symbol itself still says nothing; it is the word in capital letters. The old semantics joke makes the point. Q: What is the meaning of life? A: LIFE. Jurafsky and Martin attribute it to the semanticist Barbara Partee and call capitalization a pretty unsatisfactory model of meaning. Every relation you want, from similarity to connotation, has to be typed in by a person, and nothing about DOG tells you that it should sit near CAT.

RepresentationWhat it encodesWhat it misses
String or index w_iWhich word this is: identity, and nothing elseEvery relation. cat is exactly as far from dog as from spreadsheet
Logical symbol DOGWhatever axioms someone writes by hand, such as every dog is a mammalGraded similarity, connotation, and any relation nobody wrote down; the symbol only renames the word
Vector (preview of this lecture)Position in a space learned from how the word is used, so closeness is computableSense distinctions, if one vector must serve every sense of the word
Three ways to represent a word, and what each one leaves out

The rest of the lecture fills the third row. Vector semantics represents a word as a point in a space built from the contexts it appears in, and the resulting Embedding makes closeness a number you can compute instead of an axiom someone must write.

Recall

Why are vocabulary indices and logic symbols like DOG unsatisfying meaning representations?

Indices make every word equally different: distinct one-hot vectors have dot product 0. DOG just renames the word and needs hand-written axioms, so neither yields similarity, antonymy or connotation automatically.

Consider three sentences: Ann bought a car from Bo. Bo sold Ann a car. Ann paid Bo for a car. One event, one car, one transfer of money, described from three positions. Any adequate account of word meaning has to know that buy, sell and pay are tied together this way, and none of the symbol representations from the previous concept does.

Lexical semantics is the linguistic study of word meaning. It is not the study of dictionary definitions one entry at a time; it is the study of how meanings relate to each other. Jurafsky and Martin turn its findings into a list of what a model of word meaning should deliver, and this list is the checklist every later model in the lecture is graded against.

Desiderata from lexical semantics (SLP3 section 5.1)

Similarity
cat is similar to dog, and the model should say so without being told
Antonymy
hot and cold are opposites on one dimension, temperature, and alike on everything else
Connotation
happy carries positive feeling and sad carries negative feeling, beyond what each word refers to
Perspective
buy, sell and pay describe one commercial event from the buyer, the seller and the money
Inference
from 'Ann sold Bo a car' a question answering system should conclude that Bo bought a car

The first three entries get their own treatment in part 02: similarity as a graded human judgment, Antonymy as opposition on a single feature, and Connotation as affective meaning. Perspective and inference are what make the list more than a thesaurus: a question answering system that is asked who bought the car must connect it to a sentence that only says who sold it.

Keep the list in view as the lecture moves on. Sparse count vectors will turn out to be good at similarity and relatedness and weak at antonymy, because hot and cold occur in the same contexts. Word2vec will improve similarity further and add analogies, yet still give one vector to every sense of a word. Each model earns or loses marks on these rows.

Recall

List the five desiderata for a theory of word meaning, with one example each.

Similarity (cat and dog), antonymy (hot and cold), connotation (happy and sad), perspective (buy, sell and pay describe one event) and inference (Ann sold Bo a car, so Bo bought a car).

One lemma, many senses: the mouse entry

Type mouse into WordNet. The slide quotes two of its meanings: any of numerous small rodents, and a hand-operated device that controls a cursor. The full WordNet 3.0 entry has six: four noun senses and two verb senses. Before naming the parts of this entry, look at how much a single spelling has to carry.

from nltk.corpus import wordnet as wn

for synset in wn.synsets("mouse"):
    print(synset.name(), synset.lemma_names())
Listing the WordNet synsets of mouse with NLTK

The six synsets NLTK returns for mouse (WordNet 3.0)

mouse.n.01
Any of numerous small rodents (the slide's first sense)
shiner.n.01
A swollen bruise around the eye; the synset is shiner, black_eye, mouse
mouse.n.03
A person who is quiet or timid
mouse.n.04
A hand-operated device that controls a cursor (the slide's second sense)
sneak.v.01
To go stealthily or furtively
mouse.v.02
To manipulate the mouse of a computer
The lemma mouse (N) branches into four noun senses: the two on the slide in the main accent, the black eye and timid person senses in teal, with a note on the verb's two senses below

Lemma and wordform

The headword mouse is a Lemma, also called the citation form: the form under which a dictionary lists the word. The plural mice has no entry of its own; it is a wordform of the same lemma. A wordform is any inflected form a lemma takes in running text. The same split holds across verbs and languages, and it is the same lemma idea you met in tokenization and morphology.

WordformLemmaInflection
micemousePlural noun
sang, sungsingPast tense and past participle
duermesdormirSpanish, second person singular present: you sleep
Wordforms grouped under their lemma

Sense and polysemy

Each numbered meaning in the entry is a sense: a discrete aspect of the word's meaning. A lemma with several senses is polysemous, and the phenomenon is called Polysemy. WordNet groups senses into synsets, sets of near-synonymous senses that share one gloss and express one concept. That is why the black eye sense appears under the name shiner.n.01: its synset is {shiner, black_eye, mouse}, and WordNet names a synset after its first member.

How do you know two meanings really are separate senses? One practical test is the zeugma. In ?Does Air France serve breakfast and Philadelphia? the two uses of serve (providing food and flying to a city) are forced to share one verb, and the sentence sounds like a pun. That oddness is the evidence for two senses. With one sense, coordination is fine: Air France serves breakfast and lunch.

Why the split matters for systems

Jurafsky and Martin point out that a search for mouse info is ambiguous between a pet owner and a shopper. Deciding which sense a given occurrence uses is the task of word sense disambiguation. And the split sets up a limitation you will meet at the end of this lecture: a Static embedding gives each word type one vector, so the vector for mouse must blend the rodent and the device. A Contextual embedding computes a different vector for each occurrence, which is how modern models separate senses.

Recall

Using mouse and mice, define lemma, wordform, sense and polysemy.

mouse is the lemma (citation form). mouse and mice are wordforms. The rodent and the cursor device are two senses. A lemma having several senses is polysemy.

Quick check

Which statement correctly relates a lemma to its senses?

couch and sofa. filbert and hazelnut. car and automobile. vomit and throw up. big and large. Each pair can be swapped in some sentence without anyone noticing a change in what is claimed. That intuition has a precise form.

Two words are synonymous if they can be substituted for each other in any sentence without changing the truth conditions of the sentence, that is, the situations in which the sentence would be true. This is Synonymy in its truth-conditional definition. I sat on the couch and I sat on the sofa are true in exactly the same situations. WordNet even files car and automobile in the same synset, car.n.01.

The slide states the same idea more loosely: synonyms have the same meaning in some or all contexts. All contexts is the strict truth-conditional ideal. Some contexts is what real pairs such as big and large achieve, and that gap is exactly why synonymy is stated between senses rather than words.

The twist: the relation is between senses

Try the substitution with big and large. In Would I be flying on a large or small plane? the swap to big is harmless. In Miss Nelson became a kind of big sister to Benjamin it is not: a large sister is a different claim. The textbook draws the conclusion directly. Synonymy is a relationship between senses rather than words. WordNet makes this visible: big has 17 synsets and large has 11. They share some, such as large.a.01, above average in size, and not others, such as big.s.01, significant. A claim that two words are synonyms is really a claim about one of their senses.

Two regions of contexts for big and large: a large plane lights in the overlap where they share the size sense, while big sister glows only in the region that belongs to big

Worked example

Testing a candidate synonym pair

  1. Substitute in several sentences

    Take big and large. Swap them in a large plane, a big house, a big decision and my big sister.
  2. Check the truth conditions

    A large plane and a big plane are true of the same planes. A big decision is an important one, and a large decision is at best odd. My large sister makes a claim about her size, not her age.
  3. Find the sense in play

    The swaps that succeed all use the size sense (large.a.01). The swaps that fail use senses only big has: significant, and older or grown up.
  4. Check register and genre

    Even in the size sense, check whether one word belongs to a different style. Here neither is marked, so the pair survives.
  5. Result

    Of the sentences tested, big and large swap only in the size sense, so they are near-synonyms in that sense, not as words.

Recall

Give the truth-conditional definition of synonymy, and say why it is a relation between senses.

Two words are synonymous if they can be swapped in any sentence without changing the truth conditions. The swap works only when both words are used in a shared sense: big and large swap in a large plane (size) but not in my big sister (older), so the relation holds between particular senses. The slide's version, same meaning in some or all contexts, allows the partial case.

Quick check

Why does 'my large sister' sound wrong while 'a large plane' is fine?

water and H₂O refer to the same substance. Swap them in the glass contains water and the sentence stays true in exactly the same situations. Now imagine a hiking guide that says to carry two litres of H₂O per person. Nothing false was said, and yet the sentence is wrong for its setting. That wrongness is part of what the words mean.

The same thing happens with big and large: even setting aside the older-sibling sense, the pairs that pass the truth test still differ somewhere. Jurafsky and Martin put it carefully: while substitutions between some pairs of words like car and automobile or water and H₂O are truth preserving, the words are still not identical in meaning, and probably no two words are absolutely identical in meaning.

The principle of contrast

The generalization behind this is the Principle of contrast: a difference in linguistic form is always associated with some difference in meaning. The idea has a long history, from Girard in 1718 and Bréal in 1897 to Eve Clark in 1987, who stated it as: every two forms contrast in meaning. Clark used it to explain language acquisition: a child who already knows one word for a thing assumes a new word for the same thing must mean something different. In her words, there are no true synonyms.

Where do apparent synonyms differ, if not in truth? Clark names three dimensions, and the slide's list of politeness, slang, register and genre maps onto them.

  • Dialect. autumn and fall, truck and lorry, tap and faucet: the choice tells the listener where the speaker is from.
  • Register. die, pass away and pop off; attempt and try. A register is a speech style such as formal, colloquial or technical. Politeness and slang sit here, and so does genre: H₂O is the technical register of a chemistry text.
  • Connotation. politician and statesman, skinny and slim: the referent can be the same while the attitude differs. This is Connotation, which part 02 measures.
water slides to the casual end of a genre axis and H₂O to the technical end, while both stay linked to the same referent: same truth conditions, different meaning
PairSame truth?Where they differDimension
water and H₂OYesH₂O belongs to scientific writing; it is odd in a hiking or surfing guideGenre and register
big and large (sister)Nobig has an older or grown-up sense that large lacksNot a contrast case: a different sense (see concept 4)
die and pass awayYespass away is the polite, euphemistic choice; pop off is slangRegister (politeness)
politician and statesmanMostlystatesman praises, politician often does notConnotation
truck and lorryYesAmerican versus British EnglishDialect
Apparent synonym pairs and where they part ways

The consequence for the rest of the course is terminological: when NLP papers say synonym, they mean approximate synonymy, two senses close enough to substitute in most contexts. It also has an engineering consequence. Query expansion in search, paraphrase generation and data augmentation by synonym replacement all assume substitutability, and the principle of contrast predicts they will shift register, sense or tone some of the time. A paraphraser that rewrites passed away as died has kept the truth and changed the message.

Recall

State the principle of contrast and name the three dimensions along which apparent synonyms usually differ, per Clark.

Every difference in form marks some difference in meaning. The dimensions are dialect (truck and lorry), register (die and pass away) and connotation (politician and statesman).

Recall

Why is water and H₂O not a perfect synonym pair, even though substitution preserves truth?

The swap keeps the truth conditions, but H₂O belongs to a scientific genre and is odd in a hiking guide. By the principle of contrast that genre difference is part of its meaning.

Quick check

In a hiking guide, what best describes replacing water with H₂O?

car and bicycle are not synonyms. Neither are cow and horse. Yet everyone feels they belong together: both pairs share an element of meaning, a vehicle you ride on a road, a large farm animal. Swap them, though, and the truth changes. I took my car to work describes a different morning from I took my bicycle to work.

This relation is Word similarity. Jurafsky and Martin give the reason it matters: while words don't have many synonyms, most words do have lots of similar words. A model that only knew synonymy would have almost nothing to say about most of the vocabulary; a model of similarity has something to say about every word.

There is a second, quieter shift. Synonymy was a relation between senses, which requires deciding first what the senses of every word are. Similarity is usually stated between words, which avoids committing to a sense inventory at all. That is exactly the quantity vector models compute: one number for a pair of words, later the cosine of the angle between their vectors. Part 02 shows how humans rate it, on datasets such as SimLex-999, and how it differs from relatedness.

RelationHolds betweenExampleSubstitutable?
SynonymySensescouch and sofaMostly yes, in the shared sense
SimilarityWordscar and bicycleNo, the truth of the sentence changes
Synonymy versus similarity

Recall

How does similarity differ from synonymy, and why is it the better target for vector models?

Synonymy holds between senses and requires substitutability with the same truth conditions. Similarity is a graded relation between words that share elements of meaning (car and bicycle), without substitutability. Most words have few synonyms but many similar words, and similarity needs no sense inventory, so it is what a vector model can measure for every word.

Quick check

Which pair is similar but not synonymous?

Recap

If you remember nothing else

  • Treating a word as an index or as a symbol like DOG gives identity, not meaning. Every pair of distinct one-hot words has dot product 0.
  • Lexical semantics wants a model that captures similarity, antonymy, connotation, perspective (buy, sell, pay) and inference.
  • A lemma (citation form) groups wordforms such as mouse and mice. Its senses are discrete aspects of meaning. Several senses means polysemy.
  • WordNet 3.0 lists 4 noun senses and 2 verb senses for mouse. The slide shows only the rodent and the cursor device.
  • Synonyms can be substituted without changing truth conditions, and synonymy holds between senses: big and large share size but not older sibling.
  • Principle of contrast: every difference in form marks a difference in meaning, so perfect synonyms probably do not exist.
  • Apparent synonyms differ in dialect, register or connotation. H₂O belongs to a scientific genre, so it is odd in a hiking guide.
  • Similarity (car and bicycle, cow and horse) is a graded relation between words. It is what vector models measure next.

Sources