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

0% found this document useful (0 votes)
10 views7 pages

NLP Asgn1

The document provides an overview of discourse and pragmatic analysis, emphasizing the importance of context in understanding meaning in communication. It explains various stages of natural language processing (NLP), including lexical, syntactic, semantic, discourse integration, and pragmatic analysis, along with examples for each. Additionally, it discusses ambiguity in natural language, its types, and relationships between word meanings such as synonymy, antonymy, homonymy, polysemy, hyponymy, meronymy, and hypernym.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

NLP Asgn1

The document provides an overview of discourse and pragmatic analysis, emphasizing the importance of context in understanding meaning in communication. It explains various stages of natural language processing (NLP), including lexical, syntactic, semantic, discourse integration, and pragmatic analysis, along with examples for each. Additionally, it discusses ambiguity in natural language, its types, and relationships between word meanings such as synonymy, antonymy, homonymy, polysemy, hyponymy, meronymy, and hypernym.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Q. Define Discourse and Pragmatic analysis.

Pragmatics in NLP is the study of contextual meaning. It examines cases where a person's statement has
one literal and another more profound meaning. It tells us how different contexts can change the meaning
of a sentence. It is a subfield of linguistics that deals with interpreting utterances in communication.the
learner must be able to connect speech to communication.

For example, when valmie says,

‘Mama,' she is not just randomly uttering


sounds, but is aware of the connection between her sounds and her mother.Further, she uses that knowledge
to communicate something.

Pragmatic knowledge is important to have because languages are ambiguous and people don't always say
what they mean. Since our conversations are full of ambiguity and implicatures, we rely on pragmatic
inferencing and principles (e.g. the Cooperative Principle, Gricean Maxims) to understand each other.

One example of pragmatics in language would be if one person asked, "What do you want to eat?" and
another responded, "Ice cream is good this time of year." The second person did not explicitly say what
they wanted to eat, but their statement implies that they want to eat ice cream.

Discourse Integration

○​ It includes idioms, metaphors, and similes. Understanding non-literal language requires analyzing the
context and inferring if someone the intended meaning, they are not implying that animals are raining cats
and dogs, literally falling from the sky.

It involves considering the larger context, including previous sentences and the overall meaning of the text,
to resolve ambiguities and interpret language more accurately. Some common tasks in this phase include:
information extraction, conversation analysis, text summarization, discourse analysis.

imagine a customer support chat:

User: "I lost my credit card yesterday."

Bot: "I'm sorry to hear that. Would you like to report it as lost or request a replacement?"

User: "Cancel it."

Without discourse integration, the bot might struggle to understand whether "cancel it" refers to the report
or the card itself. Discourse integration, by analyzing the conversation history, would correctly identify that
"cancel it" refers to the lost card, leading to a more accurate response.
Q. What is NLP? Discuss various stages involved in the NLP process with suitable examples.

Natural language processing is the process of computer analysis of input provided in a human language and
conversion of this input into a useful form of representation. NLP refers to the AI method of communicating with
intelligent systems using a natural language such as english.

Stages:

1.​ Lexical analysis is the first stage in NLP. It is also known as morphological analysis. At this stage the
structure of the words is identified and analysed.scans the source code of a stream of characters. Then it
converts into meaningful lexemes. It divides the whole text into paragraphs, sentences and words. It studies
the patterns of formation of words. It combines sounds into minimal distinctive units of meaning. It is the
analysis of individual word that consist of morphemes the smallest grammatical unit. Involves breaking down text into
meaningful units (tokens) and identifying their part-of-speech (POS) tags. Eg- analysing the sentence "The quick
brown fox jumps over the lazy dog," → a lexical analyser would identify tokens like ‘the’, ‘quick’,’brown’,’fox’,etc,
and assign them POS tags like article,adj,noun etc.
2.​ Syntactic analysis involves analysis of words in the sentence for grammar and ordering words in a way that
shows the relationship among the words. It is used to check grammar, word arrangement shows the
relationship among the words. Hence words are collected to form sentences. Eg- pune goes gopal. → does
not make any sense so the sentence is rejected by the syntactic analyser. In LP, syntactic analysis, also
known as parsing, breaks down sentences into their grammatical components, revealing relationships
between words and phrases. Grammatical components such as verbs, nouns, and adjectives. Thus, it
enables machines to understand the structure as well as the meaning of the texts. A simple example is
analyzing "The cat sat on the mat." This involves identifying "The cat" as the subject (noun phrase), "sat"
as the verb, and "on the mat" as the prepositional phrase, along with understanding the subject-verb and
verb-object relationships.

3.​ Semantic analysis draws the exact meaning or the dictionary meaning from the text. The text is checked for
meaningfulness. It is done by mapping syntactic structures and objects in the task domain. The semantic
analysis neglects sentences such as “hot ice cream”. It focuses on the literal meaning of words, phrases &
sentences. Eg: “The table is on the ceiling “ → This is syntactically correct but semantically wrong.
Semantic analysis works to understand the meaning behind a sentence, it can help to use an example to
illustrate its importance in machine learning. Eg- the spoken sentence: "That Apple is so sweet!" → This
phrase could refer to the fruit, an apple, or the brand Apple. Hence it may involve ambiguities to some
extent.

4.​ Discourse integration - the meaning of the sentence depends on the meaning of the sentence used just
before it. Furthermore, it also brings about the meaning of the immediately following sentence. Eg- meena
is a girl she goes to school → she is a dependency pointing to meena. DI depends upon the sentences that
precede it and also invokes the meaning of sentences that follow it DI mainly studies the intersentential
connections. It studies how the preceding sentence can change the interpretation of the next following
sentence.

5.​ Pragmatic analysis- during this what was said is re-interpreted on what it truly meant. It contains deriving
those aspects of language which necessitates real world knowledge. It helps one to discover the intended
effect by applying a set of rules that characterise cooperative dialogues. It is mainly concerned with how
sentences are used and what the inner meaning of the sentence is. Eg- “open the door” is interpreted as a
req instead of an order.

Q. What do you mean by ambiguity in natural Language? Explain its types and ways to resolve it with suitable
examples.

Ambiguity in Natural Language refers to cases where words, phrases, or sentences can be interpreted in more than
one way, leading to potential misunderstandings in communication or processing. Ambiguity can be referred to as
the ability of being understood in more than one way. Natural language is very ambiguous.

Types:
1.​ Lexical ambiguity(Word Sense Ambiguity)

The ambiguity of a single word is called lexical amb. A single word has multiple meanings.

Example:

-​ “bank” → financial institution or river bank.


-​ Treating the word silver as a noun,adj,verb.
-​ ‘Back’ → back door(adj) or back stage(N)

2.​ Syntactic (Structural) Ambiguity

This kind of ambiguity occurs when a sentence is parsed in different ways. Sentence structure
allows multiple parse trees.

Example:

-​ “I saw the man with the telescope.”

→ It’s unclear whether “with the telescope” describes how I saw him or describes the man.

-​ ‘The man saw the girl with the telescope.

→ It is ambiguous whether the man saw the girl carrying a telescope or he saw her
through his telescope

3.​ Semantic Ambiguity

This kind of ambiguity occurs when the meaning of the words themselves can be misinterpreted.
In other words, semantic ambiguity happens when a sentence contains an ambiguous word or
phrase. Even with clear syntax, meaning remains ambiguous. semantic ambiguity is related to the
sentence interpretation.

Example:

-​ “We saw her duck.”​


→ Could mean observing her pet duck or witnessing her duck (the action).
-​ I saw the girl on the beach with my binoculars.

→ This means that i saw a girl on the beaches through bino or saw the girl with my
binoculars.

-​ "The car hit the pole while it was moving"

→ is having semantic ambiguity because the interpretations can be "The car, while
moving, hit the pole" and "The car hit the pole while the pole was moving".
4.​ Referential (Anaphoric) Ambiguity

This kind of ambiguity arises due to the use of anaphora entities in discourse. Pronouns or noun
phrases have unclear antecedents.

Example:

-​ “John told Peter that he would help him.”

→ Who is “he”? John or Peter?

-​ The horse ran up the hill. It was very steep. It soon got tiring.

→ Here, the anaphoric reference of "it" in two situations causes ambiguity.

5.​ Pragmatic Ambiguity

Such kind of ambiguity refers to the situation where the context of a phrase gives it multiple
interpretations. In simple words, we can say that pragmatic ambiguity arises when the statement is
not specific. Meaning depends on intent, context, or social norms.

Example:

-​ “Can you pass the salt?”

→ Could be interpreted as a question of ability or a request.

-​ 'I like you too" can have multiple interpretations

→ like I like you (just like you like me), I like you (just like someone else dose).

Q. Explain with suitable examples the following relationships between word meanings: Homonymy, Polysemy,
Synonymy, Antonymy, Hypernym,Hyponym, Meronomy.

1.​ Synonymy
Definition: Words that have the same or very similar meanings.

Example: "Big" and "large," "happy" and "cheerful," or "intelligent" and "smart”.
2.​ Antonymy
Definition: Words that have opposite meanings.

Example:
"Hot" and "cold," "up" and "down," "good" and "bad”.
The soup is hot. → The ice cream is cold.
Happy ↔ Sad – She felt happy. He looked sad

3.​ Homonymy:
Definition: Words that share the same spelling or pronunciation but have
completely different, unrelated meanings.

Example:
"Bank" (financial institution) and "bank" (land alongside a river) are homographs (same spelling)
and homophones (same pronunciation).
"Bat" (flying mammal) and "bat" (used in sports) are homophones but not homographs.

4.​ Polysemy:
Definition: A single word with multiple, related meanings.

Example:
"Bright" can mean "shining" (a bright light) or "intelligent" (a bright student).
→ These meanings are related through a metaphorical extension.
"Head" can refer to the body part, the top of something, or the leader of a group.

5.​ Hyponymy:
Definition: A hierarchical relationship where one word (the hyponym) is a more specific instance of
another word (the hypernym or superordinate).

Example:
"Red," "blue," and "green" are hyponyms of "color" (the hypernym).
"Dog," "cat," and "bird" are hyponyms of "animal”.
“Rose” is a hyponym for " flower". “Poodle” is a hyponym for “dog”.

6.​ Meronymy
Definition: A part-whole relationship. One word represents a part of something,and another word
represents the whole.

Example:
"Wheel" is a meronym of "car."
"Finger" is a meronym of "hand."
"Leaf" is a meronym of "tree."
7.​ Hypernym
Definition: A hypernym is a word with a broad meaning that encompasses more specific words
(hyponyms).
Examples:
Animal is a hypernym for dog, cat, elephant, etc.
Fruit is a hypernym for apple, banana, orange, etc.
Q. Differentiate between Syntactic Ambiguity and Lexical Ambiguity

Feature Syntactic Ambiguity Lexical Ambiguity

Ambiguity arising from the structure or syntax of a Ambiguity arising from a word having
Definition ntence, where a sentence can be parsed in multiple ultiple meanings or senses within the same
ays. ntext.

Caused by the arrangement of words and grammatical Caused by a single word having more than
Source
ructure. ne meaning.

"I saw the man with the telescope." (Unclear if 'with "Bank" (can mean the side of a river or a
Example
e telescope' describes 'the man' or 'I saw') nancial institution)

Level of
Sentence or phrase level Word level
anguage

Requires re-parsing or restructuring the sentence to Requires context to determine which


Resolution
arify meaning. eaning of the word is intended.

Effect on May lead to misunderstanding of the whole sentence May lead to confusion about the specific
ommunication its intended meaning. ord, but not necessarily the whole sentence.

Detected by analyzing possible grammatical Detected by identifying words with multiple


Detection
ructures. ctionary definitions

You might also like