The representation of meaning is the focus of semantic analysis. It is primarily concerned with the literal meaning of words, phrases, and sentences. The goal of semantic analysis is to extract exact meaning, or dictionary meaning, from the text. The semantic analyzer's job is to check the text for meaning.
We already know that lexical analysis deals with word meanings; how does semantic analysis differ from the lexical analysis? Lexical analysis is based on smaller tokens, whereas semantic analysis is based on larger chunks.
Elements of Semantic Analysis:
- Hyponymy: The relationship between a generic term and instances of that generic term is known as hyponymy.
- Homonymy: The words with the same spellings but different and unrelated meanings are known as homonymy.
- Polysemy: Despite having a different and related meaning, polysemy has the same spelling.
Lexical semantics is the first stage of semantic analysis, which involves examining the meaning of specific words. It also includes single words, compound words, affixes (sub-units), and phrases. Lexical items refer to all words, subwords, etc. collectively. In other words, lexical semantics is the study of the relationship between lexical items, sentence meaning, and sentence syntax.