AI Glossary / Natural language and speech / Intermediate
Computational semantics
Definition
Definition: Computational semantics studies how computers can represent and process linguistic meaning. It includes methods for interpreting words and sentences, constructing meaning representations and using those representations in tasks such as answering questions or drawing inferences.
What it means
What it means: Recognizing the words in a sentence is not enough to determine what it says. A system may need to identify participants, relationships, negation, reference and the scope of expressions such as every or some. These distinctions affect the answers and actions that follow.
Computational semantics includes multiple approaches rather than one universal representation. Logical forms make some relationships explicit; frames and graphs describe events and participants; distributional representations capture patterns of meaning-related use. A representation useful for finding similar passages may be insufficient for checking who approved a particular request. The required meaning distinctions depend on the task.
How it works
How it works: A system maps linguistic input into a representation and interprets it using context or background information. Semantic parsing can construct a logical expression, structured query or other formal object. Semantic role labeling identifies how participants relate to an event, such as who transferred an item and who received it.
The representation must preserve the distinctions needed downstream. A negated statement cannot be treated as a positive fact merely because it contains the same nouns and verb. Evaluation can test the representation itself, its consequences or both. If a system answers from a knowledge base, the answer also depends on whether that knowledge base is complete and accurate.
Three practical examples
Three practical examples:
1. A catalog assistant interprets “items supplied by Delta” as a relation between items and their supplier. It should not return every document that merely mentions Delta near a product name.
2. A document-analysis tool distinguishes “the shipment arrived” from “the shipment did not arrive.” The same event vocabulary supports opposite claims, so negation must remain visible.
3. A search interface recognizes that an active and a passive sentence can describe the same transfer. It tracks the giver, recipient and object rather than relying solely on the order in which names appear.
Think of it this way
Think of it: Computational semantics resembles turning a message into a structured map of what is being said. The map helps a program follow relationships that word lists would obscure. The analogy is limited because no practical representation automatically preserves every nuance, and a map of a claim is not evidence that the claim is true.
Worked example
Worked example: Consider two toy statements: “Every analyst reviewed a report” and “There is a report that every analyst reviewed.” Give the first statement its reading where each analyst may have reviewed a different report. It can be represented as: for every x, if x is an analyst, there exists a report y that x reviewed.
The second requires one report y such that every analyst reviewed that same report. To see the difference, imagine two analysts, Ada and Ben, and two reports, R1 and R2. Ada reviewed only R1, and Ben reviewed only R2. The first reading is true in this toy world because each analyst reviewed a report. The second is false because no report was reviewed by both.
A system that flattens both statements into the words analyst, reviewed and report loses the crucial scope distinction. Natural language can admit multiple readings, so the example explicitly fixes the first interpretation rather than asserting that the first sentence always has only that reading.
Illustrative case study
Illustrative case study: Fictional Juniper Records builds a question-answering interface over project notes. Early tests treat a proposed delivery and a completed delivery as the same event because both mention a supplier, an item and a date.
The team adds explicit status distinctions and tests questions against notes describing plans, cancellations and completed actions. Reviewers inspect the supporting passage before accepting the extracted event as a fact. This invented case illustrates the difference between matching event vocabulary and representing what the text actually claims. It does not assert that adding one label solves tense, modality or all context-sensitive interpretation.
Common misconceptions and mistakes
Common misconceptions and mistakes: Semantic similarity is not logical equivalence. Two sentences can discuss almost identical topics while contradicting each other. A semantic role is also not always the same as a syntactic position: the receiver can appear in different grammatical constructions. Extracting a statement does not verify it against reality. Finally, missing information should not automatically be treated as false unless the system's knowledge assumptions justify that conclusion.
Business use
Business use: Define which meaning distinctions affect the intended workflow before choosing an evaluation metric. For document questions, test reversed participants, negation, dates, quantities and ambiguous references. For structured queries, verify that the generated interpretation matches the requested condition, not merely that it runs successfully. Preserve evidence links so people can inspect disputed readings. Report the limits of the representation, especially when it omits uncertainty, conditions or temporal information that could change a business decision.
People also ask
People also ask: Is computational semantics the same as natural language processing?
It is an area within NLP concerned with meaning; NLP also includes tasks involving sounds, spelling, grammatical structure and other aspects of language.
Must meaning be represented with logic?
No. Logic is one approach. Frames, graphs, vectors and combinations serve different purposes and preserve different information.
Does a correct meaning representation make a statement true?
No. It can correctly represent a false, fictional or uncertain statement. Understanding a claim and verifying it are separate tasks.
Check your understanding
Check your understanding: If each of three engineers checked a different machine, does that establish that one machine was checked by all three?
Answer: No. Each engineer having some checked machine does not imply that they share the same machine. The order and scope of the requirements matter.
Related terms
- Semantic parsing
- Semantic role labeling
- Compositional semantics
- Distributional semantics
- Textual entailment
- meaning representation
- logical form
- quantifier scope
Learn next
write pairs of sentences that differ only in negation, participant order or quantifier scope. State a small situation where their truth differs. Then decide which distinctions a search system, an extraction system and a query-execution system would each need to preserve.
More in Natural language and speech
- Complementizers - Complementizers are words that mark an embedded clause, especially a clause functioning as the complement of another expression.
- Componential analysis - Componential analysis is an approach to word meaning that describes lexical items through smaller semantic features or components.
- Computational linguistics - Computational linguistics is the study of human language using computational models and methods.
- Concept mining - Definition: Concept mining is the computational identification of meaningful concepts in material such as documents, queries or other data.
- Conceptual dependency - Conceptual dependency is a historical approach to representing the meaning of language through networks of concepts, primitive acts and their participants.
- Concrete word - A concrete word is a word whose meaning is closely connected to something perceptible through the senses or to a directly experienced action.
Sources
Sources: Jurafsky and Martin, Speech and Language Processing, appendix H, Logical Representations of Sentence Meaning: https://web.stanford.edu/~jurafsky/slp3/H.pdf ; chapter 22, Semantic Role Labeling: https://web.stanford.edu/~jurafsky/slp3/22.pdf ; chapter 5, Embeddings: https://web.stanford.edu/~jurafsky/slp3/5.pdf . The analyst–report model, query examples and Juniper Records case are original teaching material.
Previous: Computational photography Next: Computational statistics