Semantic Analysis and its types in compiler design
lalitasharma6203
34 views
10 slides
Aug 11, 2024
Slide 1 of 10
1
2
3
4
5
6
7
8
9
10
About This Presentation
Semantic Analysis
Size: 447.71 KB
Language: en
Added: Aug 11, 2024
Slides: 10 pages
Slide Content
PRESENTED BY:
Name : Amit Kumar Sharma
Roll no.: 27300123186
Registration no.: 22273030467
Subject : Compiler Design
Subject Code : PCCCS501
Topic : Semantic Analysis
WHAT IS SEMANTIC ANALYSIS?
▪Simply put, semantic analysis is the process of drawing
meaning from text. It allows computers to understand and
interpret sentences, paragraphs, or whole documents, by
analyzing their grammatical structure, and identifying
relationships between individual words in a particular
context.
▪Semantic analysis-driven tools can help companies
automatically extract meaningful information from
unstructured data, such as emails, support tickets, and
customer feedback. Below, we’ll explain how it works.
HOW SEMANTIC ANALYSIS WORKS
▪Lexical semantics plays an important role in semantic analysis, allowing
machines to understand relationships between lexical items (words, phrasal
verbs, etc.):
▪Hyponyms: specific lexical items of a generic lexical item (hypernym) e.g.
orange is a hyponym of fruit (hypernym).
▪Meronomy: a logical arrangement of text and words that denotes a
constituent part of or member of something e.g., a segment of an orange
▪Polysemy: a relationship between the meanings of words or phrases,
although slightly different, share a common core meaning e.g. I read a paper,
and I wrote a paper)
▪Synonyms: words that have the same sense or nearly the same meaning as
another, e.g., happy, content, ecstatic, overjoyed
▪Antonyms: words that have close to opposite meanings e.g., happy, sad
▪Homonyms: two words that are sound the same and are spelled alike but
have a different meaning e.g., orange (color), orange (fruit)
SEMANTIC ANALYSIS
▪By feeding semantically enhanced machine learning algorithms with
samples of text, you can train machines to make accurate predictions
based on past observations. There are various sub-tasks involved in a
semantic-based approach for machine learning, including word
sense disambiguation and relationship extraction:
▪Word Sense Disambiguation
The automated process of identifying in which sense is a word used
according to its context.
Natural language is ambiguous and polysemic; sometimes, the same
word can have different meanings depending on how it’s used.
▪The word “orange,” for example, can refer to a color, a fruit, or even a city in
Florida!
The same happens with the word “date,” which can mean either a particular day of the month,
a fruit, or a meeting.
In semantic analysis with machine learning, computers use word sense disambiguation to
determine which meaning is correct in the given context.
Relationship Extraction
▪This task consists of detecting the semantic relationships present in a text.
Relationships usually involve two or more entities (which can be names of people,
places, company names, etc.). These entities are connected through a semantic
category, such as “works at,” “lives in,” “is the CEO of,” “headquartered at.”
▪For example, the phrase “Steve Jobs is one of the founders of Apple, which is
headquartered in California” contains two different relationships:
SEMANTIC ANALYSIS TECHNIQUES
▪Depending on the type of information you’d like to obtain
from data, you can use one of two semantic analysis
techniques: a text classification model (which assigns
predefined categories to text) or a text extractor (which
pulls out specific information from the text).
SEMANTIC CLASSIFICATION MODELS
▪Topic classification: sorting text into predefined categories based on
its content. Customer service teams may want to classify support
tickets as they drop into their help desk. Through semantic analysis,
machine learning tools can recognize if a ticket should be classified as
a “Payment issue” or a “Shipping problem.”
▪Sentiment analysis: detecting positive, negative, or neutral emotions in
a text to denote urgency. For example, tagging Twitter mentions by
sentiment to get a sense of how customers feel about your brand, and
being able to identify disgruntled customers in real time.
▪Intent classification: classifying text based on what customers want to
do next. You can use this to tag sales emails as “Interested” and “Not
Interested” to proactively reach out to those who may want to try your
product.
SEMANTIC EXTRACTION MODELS
▪Keyword extraction: finding relevant words and expressions in a text. This
technique is used alone or alongside one of the above methods to gain more
granular insights. For instance, you could analyze the keywords in a bunch of
tweets that have been categorized as “negative” and detect which words or
topics are mentioned most often.
▪Entity extraction: identifying named entities in text, like names of people,
companies, places, etc. A customer service team might find this useful to
automatically extract names of products, shipping numbers, emails, and any
other relevant data from customer support tickets.
▪Automatically classifying tickets using semantic analysis tools alleviates
agents from repetitive tasks and allows them to focus on tasks that provide
more value while improving the whole customer experience.
Tickets can be instantly routed to the right hands, and urgent issues can be
easily prioritized, shortening response times, and keeping satisfaction levels
high.