Semantic Networks

What are the three types of semantic analysis?

A common three-part split of semantic analysis in NLP: lexical, compositional, and discourse and pragmatic meaning, explained with simple examples.

On this page
  1. A common three-level split
  2. Lexical semantics: the meaning of words
  3. Compositional semantics: meaning of phrases and sentences
  4. Discourse and pragmatic meaning: beyond one sentence
  5. Where these levels show up
  6. Other three-part lists
  7. Summary

A common three-level split

Semantic analysis in natural language processing (NLP) works out what a text means. Sources do not agree on one official list of “the three types,” so you will see different answers. One common split divides meaning into three levels: lexical meaning of individual words, compositional meaning of phrases and sentences, and discourse and pragmatic meaning across sentences and in context. Other guides list three tasks instead, which are covered at the end.

Lexical semantics: the meaning of words

Lexical semantics is about what individual words mean. Many words have several senses. “Bat” can refer to a flying mammal or to a piece of sports equipment, and “bank” can mean a financial institution or the land beside a river. Choosing the right sense from the surrounding words is called word sense disambiguation.

Lexical resources such as WordNet list the senses of words and how they relate, including synonyms and broader and narrower terms. Systems that work with word meaning often use resources like this.

Compositional semantics: meaning of phrases and sentences

Compositional semantics explains how the meanings of words combine into the meaning of a larger unit. Word order and structure matter. “The dog chased the cat” and “The cat chased the dog” use the same words but describe different events. Negation and quantifiers such as “every” and “some” also change what a sentence says.

Grouping can change meaning too. “Time flies like an arrow” can be read as a statement about how fast time passes, or as an instruction to time flies the way you would time an arrow.

Discourse and pragmatic meaning: beyond one sentence

Discourse analysis looks at how sentences connect. In “The trophy did not fit in the suitcase because it was too big,” a system has to work out that “it” refers to the trophy, not the suitcase. Finding what a pronoun or phrase points to is called coreference resolution.

Pragmatics looks at what a speaker means beyond the literal words. “Can you pass the salt?” is usually a polite request, not a question about ability. Systems that handle this must know how people use language in context.

Where these levels show up

Search engines, chatbots, translation tools and sentiment analysis all depend on some of these levels. Modern language models learn many of these patterns from large amounts of text instead of relying on hand-written rules. The three-level split is a teaching tool, not a rule that every system follows.

Other three-part lists

Some practical guides split semantic analysis into three tasks:

  • Word sense disambiguation: choosing the correct meaning of an ambiguous word.
  • Named entity recognition: finding names of people, places and organizations in text.
  • Relation extraction: finding how two entities in a text are related, such as a person and a company they founded.

These lists use different names, but the goal is the same: turning text into usable meaning.

Summary

  • Semantic analysis works out what a text means.
  • A common three-level split is lexical, compositional, and discourse and pragmatic meaning.
  • Other guides use three-part lists of tasks, such as word sense disambiguation, named entity recognition and relation extraction.

The complete guide to semantic networks

Semantic Networks in Artificial Intelligence With Examples
Read the guide

Keep exploring

Guides from other topics

All topics →