Lecture 14 - Disambiguation

Download Report

Transcript Lecture 14 - Disambiguation

Disambiguation
Read J & M Chapter 17.1 – 17.2
The Problem
•Washington Loses Appeal on Steel Duties
•Sue caught the bass with the new rod.
Sue played the bass with the awesome sound.
•Sue cooked.
The potatoes cooked.
•I saw a spring flying through the air.
Specific Problems
•Choosing the right meaning for each word.
•Mapping arguments to thematic roles.
•Resolving parsing ambiguities.
Possible Solutions
•Integrate the use of semantic knowledge into parsing.
•Extreme approach: semantic grammars.
•Build syntactic constituents and pass them to semantics for
evaluation. Reject ill formed ones or simply rank order them by
likelihood.
•Build a meaning representation of an entire sentence and attempt to
integrate it into the larger context.
•Pro: can use larger context when local information is not enough
•Con: explosion in number of possibilities
Main Approaches
•Drive the process with a knowledge base:
•Selectional restrictions
•Preference semantics/selectional association
•Count the words
Selectional Restrictions
•Mapping to Thematic roles:
•They serve meatloaf on Tuesdays.
•American serves Dallas and Austin.
•O’s serves breakfast.
•Which pubs serve minors?
•Choosing the right meaning:
•John serves with a backhand.
Selectional Restrictions – Thematic Roles
1.
2.
3.
4.
They serve meatloaf on Tuesdays.
American serves Dallas and Austin.
O’s serves breakfast.
Which pubs serve minors?
Using FOPC:
1. z y x Isa(x, serve1)  Agent(x, y)  AE(x, z)  Isa(z, Food)
(Note that if meatloaf Isa Food, this will work.
2. z y x Isa(x, serve2)  Agent(x, y)  AE(x, z)  Isa(z, Location)
Or we can skip the full power of FOPC and just search in a hyponym
structure such as WordNet.
Selectional Restrictions – Polysemy and
Homonyms
The spring fed the creek.
Selectional Restrictions Solve Obvious
Problems but Have Limitations
I want to eat seafood.
I want to eat someplace cheap.
I want to eat Italian.
What kind of dishes do you like?
John was green with envy.
The circus performer swallowed fire.
It Was Just As The Trees Whispered
Washington refused to comment.
Call me on my cell.
Restrictions aren’t
strong enough
Simple class info not
always enough
Unusual but true
Poetic
Metonymy
Constant changes –
robustness
Give Up on Knowledge – Just Count Things
Example – Word Sense Disambiguation
An electric guitar and a bass player stand off to one side.
Just Count Things - Input
Input: Typically a feature vector that represents co-occurrence or
collocation facts.
Example: An electric guitar and a bass player stand off to one side.
A collocation vector:
[guitar, NN1, and , CJC, player, NN1, stand, VVB]
A co-occurrence vector: First, look at texts containing the target word
and find the n most frequent content words. Use these as the features.
So we might use the following:
[fishing, big, sound, player, fly, rod, pound, double runs, playing, guitar, band]
producing the vector:
[0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0]
Just Count Things – Choosing
An algorithm: The Naïve Bayes Classifier
sˆ  arg max P( s | V )
sS
 arg max
sS
P(V | s) P( s)
P(V )
We can’t collect enough data to use whole feature vectors, so we
assume that the words are independent and break it up:
n
P(V | s )   P(v j | s )
j 1
P(s) is the same throughout the vector and P(V) is the same for
all candidates, given the vector, so
n
sˆ  arg max P( s) P(v j | s)
sS
j 1
Just Count Things - Training
Training the classifier: What do we need?
•Prior probabilities for each of the word senses.
•Probabilities for each feature given some particular sense. To get
these, we need to start with a sense-tagged corpus.
So this is an example of a supervised learning method.
Just Count Things in a Dictionary
The advantage: Dictionaries already exist for other reasons so if we
can use them, we can avoid hand tagging a large corpus.
Example (from Lesk): choose the correct meaning for cone in
pine cone:
pine:
1 kinds of evergreen tree with needle-shaped leaves
2 waste away through sorrow or illness
cone
1 solid body which narrows to a point
2 something of this shape whether solid or hollow
3 fruit of certain evergreen trees
We compare the three definitions of cone to the words in the
definitions for pine. We choose 3.
Limitations of the Dictionary Method
Definitions are too short.
What if we don’t know which sense to use for the surrounding words?
Sometimes this is fixed in dictionaries by the use of subject codes.
Dictionaries aren’t always up to date either, although they get updated
much more often than they used to. Example: Look at Longman’s:
http://www.longman.com/dictionaries/webdictionary.html
For cell, instant message
Counting Things for the Other Tasks
•Mapping arguments to thematic roles.
•Resolving parsing ambiguities.
Use the same techniques but we need an appropriate set of features
and a training set.
Example: http://acl.ldc.upenn.edu/P/P00/P00-1014.pdf