Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Module 4

Semantic Analysis
Semantic Analysis :
Lexical Semantics, Attachment for fragment of English- sentences, noun
phrases, Verb phrases, prepositional phrases, Relations among lexemes
& their senses –Homonymy, Polysemy, Synonymy, Hyponymy, Robust
Word Sense Disambiguation (WSD),Dictionary based approach Self
learning topics:WordNet
For humans, the way we understand what’s being said is almost an unconscious process. To
understand what a text is talking about, we rely on what we already know about language itself and
about the concepts present in a text. Machines can’t rely on these same techniques.
Semantic analysis describes the process of understanding natural language–the way that humans
communicate–based on meaning and context.

Semantic analysis is the process of finding the meaning from text. This analysis gives the power to
computers to understand and interpret sentences, paragraphs, or whole documents, by analyzing their
grammatical structure, and identifying the relationships between individual words of the sentence in
a particular context.

Therefore, the goal of semantic analysis is to draw exact meaning or dictionary meaning from the
text. The work of a semantic analyzer is to check the text for meaningfulness.

We already know that lexical analysis also deals with the meaning of the words, then how is semantic
analysis different from lexical analysis? Lexical analysis is based on smaller token but on the other
side semantic analysis focuses on larger chunks. That is why semantic analysis can be divided into
the following two parts −
Studying meaning of individual word:
It is the first part of the semantic analysis in which the study of the meaning of individual
words is performed. This part is called lexical semantics.

Studying the combination of individual words:


In the second part, the individual words will be combined to provide meaning in
sentences.

The most important task of semantic analysis is to get the proper meaning of the sentence.
For example, analyze the sentence “Ram is great.” In this sentence, the speaker is talking
either about Lord Ram or about a person whose name is Ram. That is why the job, to get
the proper meaning of the sentence, of semantic analyzer is important.
Elements of Semantic Analysis:
Followings are some important elements of semantic analysis −
Hyponymy:
It may be defined as the relationship between a generic term and instances of that generic term. Here
the generic term is called hypernym and its instances are called hyponyms. For example,
“The color is blue, yellow etc.”
the word color is hypernym and the color blue, yellow etc. are hyponyms.
Homonymy:
It may be defined as the words having same spelling or same form but having different and unrelated
meaning. For example, the word “Bat” is a homonymy word because bat can be an implement to hit
a ball or bat is a nocturnal flying mammal also.
Polysemy:
Polysemy is a Greek word, which means “many signs”. It is a word or phrase with different but
related sense. A word having more than one meaning. In other words, we can say that polysemy has
the same spelling but different and related meaning. For example, the word “bank” is a polysemy
word having the following meanings −
•A financial institution.
•The building in which such an institution is located.
•A synonym for “to rely on”.
Difference between Polysemy and Homonymy:
Both polysemy and homonymy words have the same syntax or spelling. The main
difference between them is that in polysemy, the meanings of the words are related but in
homonymy, the meanings of the words are not related. For example, if we talk about the
same word “Bank”, we can write the meaning ‘a financial institution’ or ‘a river bank’. In
that case it would be the example of homonym because the meanings are unrelated to each
other.
Synonymy:
It is the relation between two lexical items having different forms but expressing the same
or a close meaning. Examples are ‘author/writer’, ‘fate/destiny’.
Antonymy:
An antonym is a word that means the opposite of another word. For
instance, the antonym of 'hot' may be 'cold.' The root words for the word
'antonym' are the words 'anti,' meaning 'against' or 'opposite,' and 'onym,'
meaning 'name.’
Example is ‘life/death’, ‘certitude/incertitude’ ‘rich/poor’, ‘hot/cold’‘father/son’,
‘moon/sun’.
Meaning Representation:
Semantic analysis creates a representation of the meaning of a sentence. But before getting
into the concept and approaches related to meaning representation, we need to understand
the building blocks of semantic system.
Building Blocks of Semantic System:
In word representation or representation of the meaning of the words, the following
building blocks play an important role −
•Entities − It represents the individual such as a particular person, location etc. For
example, Haryana. India, Ram all are entities.
•Concepts − It represents the general category of the individuals such as a person, city,
etc.
•Relations − It represents the relationship between entities and concept. For example, Ram
is a person.
•Predicates − It represents the verb structures. For example, “semantic roles and case
grammar” are the examples of predicates.
Now, we can understand that meaning representation shows how to put together the
building blocks of semantic systems. In other words, it shows how to put together entities,
concepts, relation and predicates to describe a situation. It also enables the reasoning about
Need of Meaning Representations
A question that arises here is why do we need meaning representation? Followings are the
reasons for the same −

Linking of linguistic elements(language) to non-linguistic(Body language or Deaf and


dumb people have their own non-linguistic language) elements

The very first reason is that with the help of meaning representation the linking of
linguistic elements to the non-linguistic elements can be done.

Representing variety at lexical level

With the help of meaning representation, unambiguous, canonical forms can be


represented at the lexical level.

Meaning representation can be used to reason for verifying what is true in the world as
well as to infer the knowledge from the semantic representation.
Lexical Semantics:
The first part of semantic analysis, studying the meaning of individual words is called
lexical semantics. It includes words, sub-words, affixes (sub-units), compound words
and phrases also. All the words, sub-words, etc. are collectively called lexical items. In
other words, we can say that lexical semantics is the relationship between lexical items,
meaning of sentences and syntax of sentence.
Following are the steps involved in lexical semantics −

•Classification of lexical items like words, sub-words, affixes, etc. is performed in


lexical semantics.

•Decomposition of lexical items like words, sub-words, affixes, etc. is performed in


lexical semantics.

•Differences as well as similarities between various lexical semantic structures is also


analyzed.
NLP - Word Sense Disambiguation:
We understand that words have different meanings based on the context of its usage in the sentence.
If we talk about human languages, then they are ambiguous too because many words can be
interpreted in multiple ways depending upon the context of their occurrence.
Word sense disambiguation, in natural language processing (NLP), may be defined as the ability to
determine which meaning of word is activated by the use of word in a particular context. Lexical
ambiguity, syntactic or semantic, is one of the very first problem that any NLP system faces. Part-of-
speech (POS) taggers with high level of accuracy can solve Word’s syntactic ambiguity. On the other
hand, the problem of resolving semantic ambiguity is called WSD (word sense disambiguation).
Resolving semantic ambiguity is harder than resolving syntactic ambiguity.
For example, consider the two examples of the distinct sense that exist for the word “bass” −
•I can hear bass sound.
•He likes to eat grilled bass.
The occurrence of the word bass clearly denotes the distinct meaning. In first sentence, it
means frequency and in second, it means fish. Hence, if it would be disambiguated by WSD then
the correct meaning to the above sentences can be assigned as follows −
•I can hear bass/frequency sound.
•He likes to eat grilled bass/fish.
Evaluation of WSD:

The evaluation of WSD requires the following two inputs −


A Dictionary :
The very first input for evaluation of WSD is dictionary, which is used to specify the senses to be
disambiguated.
Test Corpus:
Another input required by WSD is the high-annotated test corpus that has the target or correct-senses.
The test corpora can be of two types;

•Lexical sample − This kind of corpora is used in the system, where it is required to disambiguate a
small sample of words.

•All-words − This kind of corpora is used in the system, where it is expected to disambiguate all the
words in a piece of running text.
Approaches and Methods to Word Sense Disambiguation (WSD):
Approaches and methods to WSD are classified according to the source of knowledge used in word
disambiguation.
Let us now see the four conventional methods to WSD −
Dictionary-based or Knowledge-based Methods:
As the name suggests, for disambiguation, these methods primarily rely on dictionaries, treasures and
lexical knowledge base. They do not use corpora evidences for disambiguation. The Lesk method is
the seminal dictionary-based method introduced by Michael Lesk in 1986. The Lesk definition, on
which the Lesk algorithm is based is “measure overlap between sense definitions for all words in
context”. However, in 2000, Kilgarriff and Rosensweig gave the simplified Lesk definition
as “measure overlap between sense definitions of word and current context”, which further
means identify the correct sense for one word at a time. Here the current context is the set of words in
surrounding sentence or paragraph.
Supervised Methods:
For disambiguation, machine learning methods make use of sense-annotated corpora to train. These
methods assume that the context can provide enough evidence on its own to disambiguate the sense.
In these methods, the words knowledge and reasoning are deemed unnecessary. The context is
represented as a set of “features” of the words.
It includes the information about the surrounding words also. Support vector machine and
memory-based learning are the most successful supervised learning approaches to WSD. These
methods rely on substantial amount of manually sense-tagged corpora, which is very expensive to
create.

Semi-supervised Methods:
Due to the lack of training corpus, most of the word sense disambiguation algorithms use semi-
supervised learning methods. It is because semi-supervised methods use both labelled as well as
unlabeled data. These methods require very small amount of annotated text and large amount of
plain unannotated text. The technique that is used by semisupervised methods is bootstrapping
from seed data.
Unsupervised Methods:
These methods assume that similar senses occur in similar context. That is why the senses can be
induced from text by clustering word occurrences by using some measure of similarity of the
context. This task is called word sense induction or discrimination. Unsupervised methods have
great potential to overcome the knowledge acquisition bottleneck due to non-dependency on
manual efforts.
Applications of Word Sense Disambiguation (WSD):
Word sense disambiguation (WSD) is applied in almost every application of language technology.
Let us now see the scope of WSD −
Machine Translation:
Machine translation or MT is the most obvious application of WSD. In MT, Lexical choice for the
words that have distinct translations for different senses, is done by WSD. The senses in MT are
represented as words in the target language. Most of the machine translation systems do not use explicit
WSD module.
Information Retrieval (IR):
Information retrieval (IR) may be defined as a software program that deals with the organization,
storage, retrieval and evaluation of information from document repositories particularly textual
information. The system basically assists users in finding the information they required but it does not
explicitly return the answers of the questions. WSD is used to resolve the ambiguities of the queries
provided to IR system. As like MT, current IR systems do not explicitly use WSD module and they rely
on the concept that user would type enough context in the query to only retrieve relevant documents.
Text Mining and Information Extraction (IE)
In most of the applications, WSD is necessary to do accurate analysis of text. For
example, WSD helps intelligent gathering system to do flagging of the correct words. For
example, medical intelligent system might need flagging of “illegal drugs” rather than
“medical drugs”
Lexicography:
WSD and lexicography can work together in loop because modern lexicography is
corpusbased. With lexicography, WSD provides rough empirical sense groupings as well
as statistically significant contextual indicators of sense.
Thank you

You might also like