0% found this document useful (0 votes)
14 views31 pages

Understanding Language Ambiguity in NLP

Uploaded by

debanga271
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)
14 views31 pages

Understanding Language Ambiguity in NLP

Uploaded by

debanga271
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

CSI 4001 Natural Language

Processing and Computational


Linguistics
Dr. Biji C. L
Associate Professor
Department of Analytics, SCOPE
[Link]
1. A financial institution.
Ambiguity 2. The side of a river.
[Link]
1. The sound a dog makes.
• Ambiguity in language can
2. The outer covering of a tree.
make communication
[Link]
challenging.
1. A flying mammal.

2. A piece of sports equipment used in baseball or cricket.


[Link]
1. To bend forward as a gesture of respect.

2. A weapon used to shoot arrows.

3. A decorative knot.
[Link]
1. To guide or direct.

2. A type of metal.
Ambiguity
• Natural language is highly ambiguous and
must be disambiguated.
• "I saw the man on the hill with a telescope."

• Did you use a telescope to see the man on the hill?

• Or, was the man on the hill holding a telescope?


Why is Language Ambiguous?
• Having a unique linguistic expression for every possible conceptualization
that could be conveyed would make language overly complex and
linguistic expressions unnecessarily long.
• Allowing resolvable ambiguity permits shorter linguistic expressions
• Language relies on people’s ability to use their knowledge and inference
abilities to properly resolve ambiguities.
• Infrequently, disambiguation fails!

4
Natural Languages vs. Computer
Languages
• Ambiguity is the primary difference between natural and computer
languages.
• Formal programming languages are designed to be unambiguous, i.e. they
can be defined by a grammar that produces a unique parse for each
sentence in the language.
• Programming languages are also designed for efficient (deterministic)
parsing, i.e. they are deterministic context-free languages (DCFLs).
• A sentence in a DCFL can be parsed in O(n) time where n is the length of
the string.

5
What does an NLP system need to
“know”?
• Language consists of many levels of structure
• Humans fluently integrate all of these in producing/understanding
language
• Ideally, so would a computer!
Natural Language Tasks
• Processing natural language text involves many various syntactic, semantic
and pragmatic tasks in addition to other problems.
Lexical Ambiguity
• Occurs when a single word has multiple meanings.

1."The fisherman went to the bank."


1. Ambiguity: Is "bank" referring to a financial institution or the side of a river?

2. Disambiguation: "The fisherman went to the river bank."


2."She cannot bear children."
1. Ambiguity: Does it mean she cannot tolerate children or she cannot have children?

2. Disambiguation: "She cannot have children."


Lexical Ambiguity

Cause: Multiple dictionary entries for the same word.


Resolution: Contextual clarification—
e.g., “He withdrew cash from the bank.”
or “He sat by the river bank.”
Syntactic Ambiguity
• Refers broadly to any ambiguity that arises from the sentence structure (syntax).
• It includes different kinds of ambiguities caused by the way words are arranged.

1."Visiting relatives can be boring."


1. Ambiguity: Does it mean that visiting relatives is boring, or that relatives who visit can be
boring?

2. Disambiguation: "Having relatives visit can be boring.“

It has two possible interpretations because of the way the phrase "visiting relatives" can be parsed:
2."The old man the boats."
1. Ambiguity: This sentence is confusing because "old" can be interpreted as an adjective for
"man" or as a verb.

2. Disambiguation: "The elderly people operate the boats."


Structural Ambiguity
• A type of syntactic ambiguity.
• Typically involves phrases or clauses that could attach to different parts of
the sentence.
1."The chicken is ready to eat."
1. Ambiguity: Is the chicken ready to be eaten, or is the chicken ready to eat something?

2. Disambiguation: "The cooked chicken is ready to be eaten."

It can be interpreted in two different ways due to how the phrase "ready to eat" attaches in
the sentence.
Semantic Ambiguity

1."The teacher said on Friday she would give a test."


1. Ambiguity: Did the teacher say this on Friday, or will the test be given on
Friday?

2. Disambiguation: "On Friday, the teacher said she would give a test."
2."He saw the man with the telescope."
1. Ambiguity: Did he use a telescope to see the man, or did he see a man
who had a telescope?

2. Disambiguation: "He used a telescope to see the man."

1. - Cause: Unclear roles

2. - Resolution: Add clarity


Pragmatic Ambiguity

1."Can you pass the salt?"


1. Ambiguity: Is this a request for the salt or a question about the ability to pass the
salt?

2. Disambiguation: "Please pass the salt."


2."Do you have the time?"
1. Ambiguity: Is this asking if you possess time or asking for the current time?

2. Disambiguation: "What time is it?"

- Cause:Pragmatic cues (politeness, social convention) override literal


meaning.
- Resolution: Use tone or context for disambiguation—understood
pragmatically as a request.
Summary
NLP is hard
• Context and structure can lead to multiple interpretations.
• Ambiguities compound to generate enormous numbers of
possible interpretations.
• Rules exist, but many exceptions!
Activity 1: Identify and Correct Ambiguity

• Instructions:
Read the sentences, Identify the ambiguity in the sentence
If a sentence is ambiguous, provide a corrected version.
1. Ambiguity Exploration
• Captain Dhoni boarded the ship.
• The captain saw the ship with the periscope.
• John loved his son, and so did Sam.
• Mary ate a salad with spinach from California for lunch on Tuesday.
• Shimla had rain on Monday. It was wet
2. Ambiguity Exploration

• The teacher praised the student with a certificate.


• He saw the man with the telescope.
• She watched the dog in the park with binoculars.
• Raj gave his brother a gift. So did Ravi.
• Priya painted the vase on the table.
• I read the book about space in the library.
• They found the treasure on the island with the pirates.
• The boy hit the dog with the stick.
• Meera liked the movie on Sunday.
• The scientist tested the solution in the lab with bubbles.
Empirical Laws
• Work on corpora using statistical models
Word Counts
• One simple statistic: counting words in Mark Twain’s Tom Sawyer
Word Counts
Zipf’s law
Zipf’s law
• An empirical law that describes the phenomenon where, in a
large dataset of natural language, the frequency of any word is
inversely proportional to its rank in the frequency table.
• This means that the most common word occurs approximately
twice as often as the second most common word, three times as
often as the third most common word, and so on
Function Words vs Content Words

Source:
Function Words vs Content Words
Content words
• Lexical morphemes that have a semantic content; i.e. they have
a particular meaning on its own.
• They are usually open class words because new content words
can be easily included to the language.
• For example, nouns, verbs, adjectives, and adverbs are content
words, because they all refer to semantic concepts.
• However, we also consider derivational affixes and negation as
content words because they change the meaning of a base
form.
Content words
• "Daddy play ball" (meaning "Daddy, play with the ball.")
• "Kitty drink milk" (meaning "The kitty is drinking milk.")
• "Baby want toy" (meaning "The baby wants the toy.")
• "Bird fly sky" (meaning "The bird is flying in the sky.")
• These sentences focus on the essential words to convey the
main idea,

You might also like