Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
41 views24 pages

Semantic Analysis in NLP Course

Uploaded by

varunshitole7777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views24 pages

Semantic Analysis in NLP Course

Uploaded by

varunshitole7777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

Natural Language Processing [414456B]

Prof. P. C. Latane
Asst. Professor
Dept. of Information Technology Engg,
Sinhgad Institute of Technology, Lonavala

[email protected]
Cell. +91 9423166094

1
Sinhgad Institutes
Unit No-03 Semantic Analysis
Syllabus:- Introduction, Meaning Representation, Lexical Semantics, Ambiguity, Word Sense Disambiguation
Discourse Processing: Introduction, Cohesion, Reference Resolution, Discourse Coherence and Structure (06 Hrs.)

Unit Objectives and outcomes: On completion the students will be able to:
1.To understand the core concepts of Natural language processing and levels of language analysis.
2.To understand the computational properties of natural languages and the commonly used algorithms for processing
linguistic information.

Unit outcomes : On completion the students will be able to


1.Understand automatic processing of human languages using computers.
2.Understand various applications of natural language processing.

Outcome Mapping:
PEOs: I, II, III POs: i, ii, iv COs: 1 PSOs: 1

Books used
1.Allen James, Natural Language Understanding, Pearson India, 2 nd Edition, ISBN: 9788131708958, 8131708950.
2.James H. Martin, Daniel Jurafsky, Speech and Language Processing,Pearson,1st Edition,ISBN: 9789332518414,
8131716724.

Sinhgad Institutes
Unit No-03
Semantic Analysis
Lecture no-01

Syllabus:- Introduction, Meaning Representation, Lexical


Semantics, Ambiguity, Word Sense Disambiguation, Discourse
Processing: Introduction, Cohesion, Reference Resolution,
Discourse Coherence and Structure
https://www.tutorialspoint.com/
natural_language_processing/
natural_language_processing_semantic_an
alysis.htm
Sinhgad Institutes
Introduction to Semantic Analysis

Introduction to Semantic Analysis


•Semantic Analysis is a subfield of Natural Language Processing
(NLP) that attempts to understand the meaning of Natural
Language. Understanding Natural Language might seem a
straightforward process to us as humans. However, due to the
vast complexity and subjectivity involved in human language,
interpreting it is quite a complicated task for machines. Semantic
Analysis of Natural Language captures the meaning of the given
text while taking into account context, logical structuring of
sentences and grammar roles.

Sinhgad Institutes
Meaning Representation

While, as humans, it is pretty simple for us to understand the


meaning of textual information, it is not so in the case of
machines. Thus, machines tend to represent the text in specific
formats in order to interpret its meaning. This formal structure
that is used to understand the meaning of a text is called
meaning representation.

Sinhgad Institutes
Meaning Representation
In order to accomplish Meaning Representation in Semantic
Analysis, it is vital to understand the building units of such
representations. The basic units of semantic systems are explained
below:
1.Entity: An entity refers to a particular unit or individual in specific
such as a person or a location. For example Pune, Delhi, etc.
2.Concept: A Concept may be understood as a generalization of
entities. It refers to a broad class of individual units. For example
Learning Portals, City, Students.
3.Relations: Relations help establish relationships between various
entities and concepts. For example: ‘IDLE is a Learning Ediator’,
‘Delhi is a City.’, etc.
4.Predicate: Predicates represent the verb structures of the
sentences.

Sinhgad Institutes
Meaning Representation

In Meaning Representation, we employ these basic units to


represent textual information.
Approaches to Meaning Representations:
Now that we are familiar with the basic understanding of
Meaning Representations, here are some of the most popular
approaches to meaning representation:
1.First-order predicate logic (FOPL)
2.Semantic Nets
3.Frames
4.Conceptual dependency (CD)
5.Rule-based architecture
6.Case Grammar
7.Conceptual Graphs
Sinhgad Institutes
Meaning Representation

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 to non-linguistic 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.
Can be used for reasoning
•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.
Sinhgad Institutes
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.
Sinhgad Institutes
Lexical Semantic Analysis

Parts of Semantic Analysis


•Semantic Analysis of Natural Language can be classified into two
broad parts:
•1. Lexical Semantic Analysis: Lexical Semantic Analysis involves
understanding the meaning of each word of the text individually.
It basically refers to fetching the dictionary meaning that a word
in the text is deputed to carry.
•2. Compositional Semantics Analysis: Although knowing the
meaning of each word of the text is essential, it is not sufficient
to completely understand the meaning of the text.
For example, consider the following two sentences:
•Sentence 1: Students love Sinhgad Institutes.
•Sentence 2: Sinhgad Institute loves Students.

Sinhgad Institutes
Ambiguity
• An issue during semantic interpretation
• Vagueness
-Example: I went to the bank
• Lexical ambiguity
• Structural ambiguity
-Quantifier scoping

Sinhgad Institutes
Word Senses
• Words can have more than one sense
• Ex. “go” can have synonyms like
– Depart
– Vanish
– Extend
– Set out …..
• Ontology- Organized method

Sinhgad Institutes
Word Sense Disambiguation

In order to understand the meaning of a sentence, the following


are the major processes involved in Semantic Analysis:
Word Sense Disambiguation:
•In Natural Language, the meaning of a word may vary as per its
usage in sentences and the context of the text. Word Sense
Disambiguation involves interpreting the meaning of a word based
upon the context of its occurrence in a text.
•For example, the word ‘Bark’ may mean ‘the sound made by a
dog’ or ‘the outermost layer of a tree.’
•Relationship Extraction:
•Another important task involved in Semantic Analysis is
Relationship Extracting. It involves firstly identifying various
entities present in the sentence and then extracting the
relationships between those entities.
Sinhgad Institutes
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.
Sinhgad Institutes
Word Sense Disambiguation
• 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.

Sinhgad Institutes
Evaluation of Word Sense Disambiguation
• 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.

Sinhgad Institutes
Discourse Processing
• The most difficult problem of AI is to process the natural
language by computers or in other words natural language
processing is the most difficult problem of artificial
intelligence. If we talk about the major problems in NLP, then
one of the major problems in NLP is discourse processing −
building theories and models of how utterances stick together
to form coherent discourse. Actually, the language always
consists of collocated, structured and coherent groups of
sentences rather than isolated and unrelated sentences like
movies. These coherent groups of sentences are referred to as
discourse.

Sinhgad Institutes
Discourse Processing
Concept of Coherence
•Coherence and discourse structure are interconnected in many ways.
Coherence, along with property of good text, is used to evaluate the
output quality of natural language generation system. The question that
arises here is what does it mean for a text to be coherent? Suppose we
collected one sentence from every page of the newspaper, then will it be a
discourse? Of-course, not. It is because these sentences do not exhibit
coherence. The coherent discourse must possess the following properties −
•Coherence relation between utterances
•The discourse would be coherent if it has meaningful connections
between its utterances. This property is called coherence relation. For
example, some sort of explanation must be there to justify the connection
between utterances.
•Relationship between entities
•Another property that makes a discourse coherent is that there must be a
certain kind of relationship with the entities. Such kind of coherence is
called entity-based coherence.
Sinhgad Institutes
Discourse Processing
Reference Resolution
•Interpretation of the sentences from any discourse is another
important task and to achieve this we need to know who or what
entity is being talked about. Here, interpretation reference is the
key element. Reference may be defined as the linguistic
expression to denote an entity or individual. For example, in the
passage, Ram, the manager of ABC bank, saw his friend Shyam at
a shop. He went to meet him, the linguistic expressions like Ram,
His, He are reference.
•On the same note, reference resolution may be defined as the
task of determining what entities are referred to by which
linguistic expression.

Sinhgad Institutes
Discourse Processing
Discourse structure
•An important question regarding discourse is what kind of
structure the discourse must have. The answer to this question
depends upon the segmentation we applied on discourse.
Discourse segmentations may be defined as determining the
types of structures for large discourse. It is quite difficult to
implement discourse segmentation, but it is very important
for information retrieval, text summarization and information
extraction kind of applications.

Sinhgad Institutes
Discourse Processing
Building Hierarchical Discourse Structure
•The coherence of entire discourse can also be considered by
hierarchical structure between coherence relations. For example,
the following passage can be represented as hierarchical
structure −
S1 − Ram went to the bank to deposit money.
S2 − He then took a train to Shyam’s cloth shop.
S3 − He wanted to buy some clothes.
S4 − He do not have new clothes for party.
S5 − He also wanted to talk to Shyam regarding his health

Sinhgad Institutes
Discourse Processing

Sinhgad Institutes
Assignment No- 03

Q1. Explain concept of Meaning Representation in Semantic


Analysis in detail with suitable example.
Q2. Explain concept of Lexical Semantic Analysis in detail with
suitable example.
Q3. Explain concept of Word Sense Disambiguation in detail
with suitable example.
Q4. Explain concept of Discourse Processing in detail with
suitable example.

Sinhgad Institutes
Thank You
Sinhgad Institutes

You might also like