Semantics
“Colourless green ideas sleep furiously” is flawless English and says nothing at all. The gap between a sentence being well formed and a sentence meaning something is where semantics lives: the study of meaning itself — of words, of the phrases built from them, and of the sentences those compose into.
Two layers of the problem
Meaning gets attacked computationally at two scales:
- Lexical semantics covers individual words — that “bank” carries distinct senses, that “buy” and “purchase” are near-synonyms, that a dog is a kind of mammal. WordNet encodes such relations by hand; embeddings learn them from distribution.
- Compositional semantics covers how meaning assembles: who did what to whom, what a negation or a quantifier scopes over, whether “every student read a book” involves one book or many.
Where it sits in a system
Semantics is the layer above syntax and below pragmatics: syntax gives the structure, semantics what that structure denotes, pragmatics what a speaker intended by it in context. Few systems compute meaning as explicit logic now — they approximate it. Sentence embeddings place paraphrases near each other, word sense disambiguation picks the right reading of an ambiguous word, semantic role labeling recovers event structure, and natural language inference tests whether one sentence follows from another.
Why it matters
Every failure that makes a language system feel stupid is a semantic failure: a search that misses the right page because the shopper typed “trainers” and the catalogue said “running shoes”, a sentiment classifier flipped by a single “not”, a translation that is grammatical and wrong. Matching strings is easy. Matching what they mean is the problem the whole field is organised around.
Semantics is the study of meaning in language — what words denote, and how word meanings combine into the meaning of a phrase or sentence. It sits above syntax, which describes structure, and below pragmatics, which covers what a speaker intends in context. Representing it computationally, through sense inventories, embeddings or logical forms, is what separates a system that matches strings from one that matches meaning.
A child learns early that the “bank” by the river is not the bank that keeps money, and that “could you pass the salt” is not really a question about ability. Working out what words actually mean is a separate skill from knowing the grammar.
Semantics is the study of exactly that: meaning. For software it is the hard part. A program can confirm that a sentence is properly built and still have no idea what it says. Getting semantics right is why a shopping site can find “running shoes” when you typed “trainers”, and why a single “not” has to flip a glowing review into a complaint.