Lecture 3 Introduction to Computational Linguistics Dr. Radhika Mamidi ENG 270 Semantic Analysis • Meaning Representation in Lexicon • Semantic Features • Case Frames • Ambiguity Resolution • Selectional Restrictions •

Download Report

Transcript Lecture 3 Introduction to Computational Linguistics Dr. Radhika Mamidi ENG 270 Semantic Analysis • Meaning Representation in Lexicon • Semantic Features • Case Frames • Ambiguity Resolution • Selectional Restrictions •

Lecture 3
Introduction to
Computational Linguistics
Dr. Radhika Mamidi
ENG 270
Semantic Analysis
• Meaning Representation in Lexicon
• Semantic Features
• Case Frames
• Ambiguity Resolution
• Selectional Restrictions
• Semantic Filtering
We are using a different representation for semantics –
from a computational perspective!
Defining words using:
Semantic Features: A semantic feature is a notational method which can be
used to express the existence or non-existence of semantic properties by using plus
and minus signs.
(+physical object)(+animal)(+human)(-male)
These features help in permitted and non permitted
combination of words.
Eg: happy pencil, table eats, green ideas will not be permitted.
Defining words using semantic features:
Man is [+HUMAN], [+MALE], [+ADULT]
Woman is [+HUMAN], [-MALE], [+ADULT]
Boy is [+HUMAN], [+MALE], [-ADULT]
Girl is [+HUMAN], [-MALE], [-ADULT]
Defining words using:
Case Frames
Defining words in terms of sentence contexts
Formulated as case frames stating the cases for verbs
Object
Object
>------------’collide’----------------<
Agent
Object
>----------------’strike’------------------<
Instrument
Representation of case frames using predicate calculus
Verb is specified as predicate and the cases as its arguments
collide (Object1, Object2)
strike (Agent, Object, Instrument)
Ambiguity Resolution
Selectional Restrictions
Word sense hierarchy based on subset relation helps in disambiguation.
This relation allows restrictions in terms of broad classes of objects.
Eg: The dishwasher read the article
Dishwasher can be a ‘person’ or a ‘machine’
Article can be a ‘text’ or an ‘object’
Constraints: for ‘read’- agent must be a person, theme must be text object
Allows now: boy, man, woman etc for agent and book, paper, journal etc for theme
So ‘dishwasher’ is a person and ‘article’ is a text.
Semantic Filtering
Eg: I wrote a letter to my aunt from London.
I saw the boy with a telescope.
PP (Prepositional Phrase) attachment ambiguity
Intuition for right reading is captured
Pragmatic Analysis
• Grice’s Conversational Implicatures
• Speech Act Theory
• Austin’s Felicity Conditions
Think if it is easy to make the computers understand
the pragmatics of language!
Grice’s theory of implicatures
• Proposed by H.P.Grice (1975)
• A theory of how people use the language.
• Guidelines for effective & efficient use of
language in conversation.
• Four Gricean Maxims
– Quality, Quantity, Relevance and Manner
– Together describe the general principle of cooperative interaction:
“...make your contribution such as is required,
at the stage at which it occurs, by the
accepted purpose or direction of the talk
exchange in which you are engaged.”
In short...
... in order to converse in a maximally efficient, rational, cooperative way, the participants should speak sincerely,
relevantly and clearly, while providing sufficient information.
Counter-example 1
A: Is your father at home?
B: Today is Monday.
Counter-example 2
A: Thanks for calling me for dinner
B: I am very sorry…..
Speech Act Theory
• Speech Acts
– Locutionary, Illocutionary, Perlocutionary Acts
– Indirect Speech Acts
• Utterances
– Constatives – stating
Eg: I eat apples.
[You may not be eating when you utter this sentence]
– Performatives – performing
Eg: I apologise.
[You are actually apologising when you utter this sentence]
Speech Acts - illustration
John to his cousin: “I will come to your wedding definitely.”
• Locutionary act: the utterance of a sentence with determinate sense and
reference
– Reference of ‘I’, ‘your’
• Illocutionary act: the making of a statement, offer, promise, etc. in uttering a
sentence, by virtue of the conventional force associated with it ( or with its
explicit performative paraphrase)
– Austin calls this act as SPEECH ACT
– Here, it is an act of promise.
• Perlocutionary act: the bringing about of effects on the audience by means
of uttering the sentence, such effects being special to the circumstances of
utterances
– John’s cousin feels happy.
Indirect Speech Acts
• A class of utterances whose syntactic forms do not
match their illocutionary force.
• The implicature arises when the sincerity conditions are
not met.
• Examples:
1. Can you pass the salt? = ‘‘please pass the salt’’
2. Will you clean your room today? = ‘‘clean your
room today’’
3. It’s cold in here. = ‘‘can you shut the windows’’
4. You are standing on my foot. = ‘‘please move’’
Examples of performative verbs
•
•
•
•
•
•
•
I apologise
I declare the games open
I hereby christen the ship H.M.S. Ulysses
I promise to get you the books tomorrow
I warn you that parking here is not allowed
I object
I sentence you to ten years of hard labour
Austin’s Felicity Conditions
Austin (1962) formulated conditions for the performatives
to be successful:
A. (i) There must be a conventional procedure having a conventional
effect
(ii) The circumstances and persons must be appropriate, as specified
in the procedure
B. The procedure must be executed (i) correctly and (ii) completely
C. Often, (i) the persons must have the requisite thoughts, feelings and
intentions, as specified in the procedure, and
(ii) if consequent conduct is specified, then the relevant parties must
so do.
Examples
• A marriage ceremony cannot be performed by
anyone.
• Saying ‘sorry’ without actually feeling apologetic.
• Using a form but with a different function.
“Will you please shut up?”
Form: Polite
Function: Impolite
Discourse Knowledge
•
•
•
•
•
•
Co-reference relations
Anaphoric forms
Local Discourse Context
Pronouns and Centering
Ellipsis
Cue Phrases
Discourse knowledge is essential in building HumanComputer interactive systems.
Co-reference relations
Co-referential forms cannot be interpreted
semantically in their own right - they refer
to something else for their interpretation.
Exophora: ‘Look at that’. that =
Endophora:
Anaphoric: Look at the fish. It is blue.
Cataphoric: It is blue, the fish.
Types of Anaphoric form
(a) Repeated form: The Prime Minister met the cricketers. The
Prime Minister wished them good luck.
(b) Partially repeated form: Prof Ruslan Mitkov met the students.
Prof. Mitkov had something nice to say to them.
(c) Lexical Replacement: Mary’s daughter came first again. The
child is good at studies.
(d) Pronominal form: Zoha said she would have to take Noor to
the doctor.
(e) Substituted form: Mary has a birthday in May. Sue has one too.
(f) Ellided form: Anne is in London. So is Kate. And Linda.
Local Discourse Context
• Includes syntactic and semantic structures of preceding
sentences.
• Useful for:
– detecting antecedents of pronouns
– interpreting sentences with VP ellipsis
• Discourse Entity list is its important aspect
– to find likely antecedent of the pronoun
Eg: John loves this house. It is big. [‘It’  John, house]
John loves this house. He is funny. [‘He’  John, house]
Some examples
• Ali slapped Sam. He was stunned.
• Ali slapped Sam. He was scolded.
Expectation Matching
Ali slapped Sam
Expectation1: Hurt
Expectation2: Wrong
Expectation3: Stunned
Expectation4: Scolded
& Theme: Sam
& Theme: Ali
& Theme: Sam
& Theme: Ali
Anaphora based on History Lists
Given the history list, recency constraint helps in
resolving pronominal reference
– check for the most recent local context that matches
all the constraints related to the pronoun
– if no antecedent is in the current local context then
search at the next most recent local context in the
history list
Eg: If the baby does not like the new toy, throw
it away.
If the baby does not like the new toy, give it the
old one.
Pronouns and Centering
Eg: Mary went to the shopping mall. She met Sally. She bought some books.
Centering Constraints:
a. If any object in the local context is referred to by a pronoun in the
current sentence, then the center of that sentence must also be
pronominalised.
b. The center must be the most preferred discourse entity in the local
context that is referred to by a pronoun.
c. Continuing with the same center from one sentence to the next is
preferred over changing the center.
Eg: Mary went to the market. She met Sally. She bought some books. Sally
bought some chocolates. She wanted to give them to her brother .
Ellipsis
• Syntactically incomplete sentences
• Parts missing are retrieved from previous major
clause.
Example: (Allen: 451)
Helen saw the movie. Mary did too.
A correspondence between the two subject forms exist
The subject from first sentence is abstracted and applied to
the new information to produce the semantic form of the
elliptical clause.
Cue Phrases
Two classes
– identifies semantic relationships between clauses or states
used for continuation, reason, contrast, conclusion
eg. Jack went to the store. Sam stayed at home.
(read with ‘and’, ‘because’, ‘but’, ‘so’ inserted in second sentence)
– indicates discourse structure (they indicate segment boundaries
used to end the current topic, to end the discourse, start digression
eg. OK/fine, Bye/thanks, By the way
Exercise 3
• Give the semantic features for the following
nouns: puppy, husband, book, dream
• Give the case frames for the following verbs:
sleep, eat, hit, read, see
• Give two examples for indirect speech acts.
• Explain the speech acts for the utterance “I am
so thirsty”
• Read all the slides!