Title: CPSC 503 Computational Linguistics
1CPSC 503Computational Linguistics
- Representing Meaning
- Lecture 15
- Giuseppe Carenini
2Knowledge-Formalisms Map(including probabilistic
formalisms)
State Machines (and prob. versions) (Finite State
Automata,Finite State Transducers, Markov Models)
Morphology
Syntax
Rule systems (and prob. versions) (e.g., (Prob.)
Context-Free Grammars)
Semantics
- Logical formalisms
- (First-Order Logics)
Pragmatics Discourse and Dialogue
AI planners
3Next four classes
- What meaning is and how to represent it
- How to map sentences into their meaning
- Meaning of individual words
- Tasks
- Information Extraction
- Information Retrieval
4Today 12/3
- Semantics / Meaning
- Meaning Representations
- First-Order Logics
- Linguistically relevant Concepts
5Semantics
- Def. Semantics The study of the meaning of
words, intermediate constituents and sentences
Def1. Meaning a representation that expresses
the linguistic input in terms of objects,
actions, events, time, space beliefs,
attitudes...relationships
Def2. Meaning a representation that links the
linguistic input to knowledge of the world
Language independent!
6Semantic Relations involving Sentences
Same truth conditions
- Paraphrase have the same meaning
- I gave the apple to John vs. I gave John the
apple - I bought a car from you vs. you sold a car to me
- The thief was chased by the police vs.
- Entailment implication
- The park rangers killed the bear vs. The bear is
dead - Nemo is a fish vs. Nemo is an animal
Contradiction I am in Vancouver vs. I am in
California
7Grammaticization
Concept
Affix
- Past
- More than one
- Again
- Negation
8Common Meaning Representations
I have a car
FOL
Semantic Nets
Conceptual Dependency
Frames
9Requirements for Meaning Representations
- Sample NLP Task giving advice about restaurants
- Accept queries in NL
- Generate appropriate responses by consulting a KB
- e.g,
- Does Maharani serve vegetarian food?
- -gt Yes
- What restaurants are close to the ocean?
- -gt C and Monks
10Verifiability (in the world?)
- Example Does LeDog serve vegetarian food?
- Knowledge base (KB) expressing our world model
- Convert question to KB language and verify its
truth value against the KB content
11Unambiguousness
Gozzilla interpretation
- Example I want to eat some place near campus.
- Final representations should be unambiguous
- Vagueness I want to eat Spanish food.
12Canonical form
- Paraphrases should be mapped into the same
representation. - Does LeDog have vegetarian dishes?
- Do they have vegetarian food at LeDog?
- Are vegetarian dishes served at LeDog?
- Does LeDog serve vegetarian fare?
- Having vs. serving
- Food vs. fare vs. dishes
13How to Produce a Canonical Form
- Systematic Meaning Representations can be derived
from thesaurus - food ___
- dish _______one overlapping meaning sense
- fare ___
- We can systematically relate syntactic
constructions - S NP Maharani serves NP vegetarian dishes
- S NP vegetarian dishes are served at NP
Maharani
14Inference and Expressiveness
- Consider a more complex request
- Can vegetarians eat at Maharani?
- Vs Does Maharani serve vegetarian food?
- Why do these result in the same answer?
- Inference Systems ability to draw valid
conclusions based on the meaning representations
of inputs and its KB
- serve(Maharani,VegetarianFood) gt
CanEat(Vegetarians,At(Maharani))
Expressiveness system must be able to handle a
wide range of subject matter
15Non Yes/No Questions
- Example I'd like to find a restaurant where I
can get vegetarian food.
- Indefinite reference lt-gt variable
- serve(x,VegetarianFood)
- Matching succeeds only if variable x can be
replaced by known object in KB.
16Meaning Structure of Language
- How does language convey meaning?
- Grammaticization
- Tense systems
- Conjunctions
- Quantifiers
-
- Display a partially compositional semantics
- Display a basic predicate-argument structure
17Predicate-Argument Structure
- Represent relationships among concepts
- Some words act like arguments and some words act
like predicates - Nouns as concepts or arguments red(ball)
- Adj, Adv, Verbs as predicates red(ball)
- Subcategorization frames specify number,
position, and syntactic category of arguments - Examples give NP2 NP1, find NP, sneeze
18Semantic (Thematic) Roles
This can be extended to the realm of semantics
- Semantic Roles Participants in an event
- Agent George hit Bill. Bill was hit by George
- Theme George hit Bill. Bill was hit by George
Source, Goal, Instrument, Force
- Verb subcategorization Allows linking arguments
in surface structure with their semantic roles
- Mary gave/sent/read a book to Ming
- Agent Theme Goal
- Mary gave/sent/read Ming a book
- Agent Goal Theme
19Selectional Restrictions
- Semantic (Selectional) Restrictions Constrain
the types of arguments verbs take - George assassinated the senator
- The spider assassinated the fly
20First Order Predicate Calculus (FOPC)
- FOPC provides sound computational basis for
verifiability, inference, expressiveness - Supports determination of truth
- Supports Canonical Form
- Supports compositionality of meaning
- Supports question-answering (via variables)
- Supports inference
21FOPC Syntax
- AtomicFormula ? Predicate (Term, )
- Term ? Function (Term,) Constant Variable
- Constant ? B VegetarianFood LeDog
- Variable ? x y
- Predicate ? Serves Near
- Function ? LocationOf CuisineOf
Give(sister-of(John), Mary, x)
- Formula ? AtomicFormula Formula Connective
Formula Quantifier Variable, Formula Ø
Formula (Formula) - Connective ? ? Ù Þ
- Quantifier ? "
22FOPC Semantics
- Formulas in FOPC can be assigned truth values
True or False - Database semantics for atomic formulas
LeDog is near campus. Near(LocationOf(LeDog),Locat
ionOf(campus))
No common-sense
23Variables and Quantifiers
- Existential () There exists
- A restaurant that serves Mexican food near UBC
- (x) Restaurant(x) Ù Serves(x,MexicalFood) Ù
Near(LocationOf(x),LocationOf(UMD))
- Universal (") For all
- All vegetarian restaurants serve vegetarian food
- ("x) VegetarianRestaurant(x) Þ Serves(x,Vegetarian
Food)
24Connectives
- I only have five dollars and I dont have a lot
of time. - Have(Speaker,FiveDollars) Ù Ø Have(Speaker,LotOfT
ime)
25Inference
26Uses of modus ponens
- Forward chaining as individual facts are added
to the KB, all derived inferences are generated
?? Þ ??
- Backward chaining starts from queries. E.g., the
Prolog programming language
father(X, Y) - parent(X, Y),
male(X).parent(john, bill).parent(jane,
bill).female(jane).male (john).?- father(M,
bill).
27Linguistically Relevant Concepts in FOL
- Categories Events (Reification)
- Representing Time
- Beliefs
- Aspects
28Categories Events
- Categories
- VegetarianRestaurant (Joes) - relation vs.
object - MostPopular(Joes,VegetarianRestaurant)
Reification
- ISA (Joes,VegetarianRestaurant)
- AKO (VegetarianRestaurant,Restaurant)
- Events
- Reservation (Hearer,Joes,Today,8PM,2)
- Problems
- Determining the correct number of roles
- Representing facts about the roles associated
with an event - Ensuring that all and only the correct inferences
can be drawn
29MUC-4 Example
INCIDENT DATE 30 OCT 89 INCIDENT
LOCATION EL SALVADOR INCIDENT TYPE ATTACK
INCIDENT STAGE OF EXECUTION ACCOMPLISHED
INCIDENT INSTRUMENT ID INCIDENT INSTRUMENT
TYPEPERP INCIDENT CATEGORY TERRORIST ACT
PERP INDIVIDUAL ID "TERRORIST" PERP
ORGANIZATION ID "THE FMLN" PERP ORG.
CONFIDENCE REPORTED "THE FMLN" PHYS TGT ID
PHYS TGT TYPEPHYS TGT NUMBERPHYS TGT
FOREIGN NATIONPHYS TGT EFFECT OF INCIDENTPHYS
TGT TOTAL NUMBERHUM TGT NAMEHUM TGT
DESCRIPTION "1 CIVILIAN"HUM TGT TYPE
CIVILIAN "1 CIVILIAN"HUM TGT NUMBER 1 "1
CIVILIAN"HUM TGT FOREIGN NATIONHUM TGT EFFECT
OF INCIDENT DEATH "1 CIVILIAN"HUM TGT TOTAL
NUMBER
30Subcategorization frames
- I ate
- I ate a turkey sandwich
- I ate a turkey sandwich at my desk
- I ate at my desk
- I ate lunch
- I ate a turkey sandwich for lunch
- I ate a turkey sandwich for lunch at my desk
no fixed arity!
31One possible solution
- Eating1 (Speaker)
- Eating2 (Speaker, TurkeySandwich)
- Eating3 (Speaker, TurkeySandwich, Desk)
- Eating4 (Speaker, Desk)
- Eating5 (Speaker, Lunch)
- Eating6 (Speaker, TurkeySandwich, Lunch)
- Eating7 (Speaker, TurkeySandwich, Lunch, Desk)
- Meaning postulates are used to tie semantics of
predicates " w,x,y,z Eating7(w,x,y,z) Þ
Eating6(w,x,y)
32Reification Again
I ate a turkey sandwich for lunch w
Isa(w,Eating) Ù Eater(w,Speaker) Ù
Eaten(w,TurkeySandwich) Ù MealEaten(w,Lunch)
- Reification Advantages
- No need to specify fixed number of arguments for
a given surface predicate - No more roles are postulated than mentioned in
the input - No need for meaning postulates to specify logical
connections among closely related examples
33Representing Time
- Events are associated with points or intervals in
time. - We can impose an ordering on distinct events
using notion of precedes.
- Temporal logic notation (w,x,t) Arrive(w,x,t)
- Constraints on variable tI arrived in New
York( t) Arrive(I,NewYork,t) Ù precedes(t,Now)
34Interval Events
- Need tstart and tend
- She was driving to New York until now
- ( tstart,tend)
- Drive(She,NewYork, Ù
- precedes(tstart,Now) Ù
- Equals(tend,Now)
35Relation Between Tenses and Time
- Relation between simple verb tenses and points in
time is not straightforward - Present tense used like future
- We fly from Baltimore to Boston at 10
- Complex tenses
- Flight 1902 arrived late
- Flight 1902 had arrived late
36Reference Point
- Reichenbach (1947) introduced notion of Reference
point (R), separated out from Speech time (S) and
Event time (E) - Example
- When Mary's flight departed, I ate lunch
- When Mary's flight departed, I had eaten lunch
- Departure event specifies reference point.
37Next Time